QComboBox: Don't do anything if wheel event delta is zero

This is a consequence of us wanting to show the OS X transient scrollbars
as soon as the user touches the trackpad with two fingers.

Task-number: QTBUG-35120
Change-Id: Icf63b0ec8c32ac66108822804bb06a0762547ef1
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
This commit is contained in:
Gabriel de Dietrich 2013-11-26 19:42:50 +01:00 committed by The Qt Project
parent 6ebaad14cc
commit 7529d38d83

View File

@ -3073,7 +3073,7 @@ void QComboBox::wheelEvent(QWheelEvent *e)
newIndex--;
while ((newIndex >= 0) && !(d->model->flags(d->model->index(newIndex,d->modelColumn,d->root)) & Qt::ItemIsEnabled))
newIndex--;
} else {
} else if (e->delta() < 0) {
newIndex++;
while ((newIndex < count()) && !(d->model->flags(d->model->index(newIndex,d->modelColumn,d->root)) & Qt::ItemIsEnabled))
newIndex++;