aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2016-03-04 16:03:14 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2016-03-07 10:00:07 +0000
commit28a94cd2d48c97b813265367a163544ac26c2063 (patch)
treecd6fb429d96865cb7f716ba9e52fd5617a9ed1c3 /src/templates
parent6e53de99b0d75063a6892f64f2e0d9f6a3105375 (diff)
ComboBox: fix activation
The highlighted index is always -1 when the popup is hidden. Thus, when pressing enter/return, it should only activate the highlighted index when the popup is visible to avoid setting the current index to -1. Change-Id: I7a66e347bf2e4b62a67eb39b119ca1de299f16ef Task-number: QTBUG-51645 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src/templates')
-rw-r--r--src/templates/qquickcombobox.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/templates/qquickcombobox.cpp b/src/templates/qquickcombobox.cpp
index 229201c5..e37b0f52 100644
--- a/src/templates/qquickcombobox.cpp
+++ b/src/templates/qquickcombobox.cpp
@@ -755,7 +755,7 @@ void QQuickComboBox::keyReleaseEvent(QKeyEvent *event)
break;
case Qt::Key_Enter:
case Qt::Key_Return:
- d->hidePopup(true);
+ d->hidePopup(d->isPopupVisible());
setPressed(false);
event->accept();
break;