summaryrefslogtreecommitdiff
path: root/src/controls/MenuBar.qml
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2015-03-24 15:54:58 +0100
committerGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2015-03-24 18:18:14 +0000
commitd124fcba6975703356a16b9e53390d0c5b6e20ad (patch)
tree55f6d94c20d9511671ec20d193b21c0fe0278d7d /src/controls/MenuBar.qml
parent7eb12f65dc8f0a703f696a710d5db802488e1e31 (diff)
downloadqtquickcontrols-d124fcba6975703356a16b9e53390d0c5b6e20ad.tar.gz
Menus: Ignore non-visible menu popups on key navigation
Change-Id: Ie9fce58dd6481a66539bfe6c24487d7c630a583f Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/controls/MenuBar.qml')
-rw-r--r--src/controls/MenuBar.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/controls/MenuBar.qml b/src/controls/MenuBar.qml
index ce37ed6d..272ed444 100644
--- a/src/controls/MenuBar.qml
+++ b/src/controls/MenuBar.qml
@@ -189,7 +189,7 @@ MenuBarPrivate {
Keys.onLeftPressed: {
if (d.openedMenuIndex > 0) {
var idx = d.openedMenuIndex - 1
- while (idx >= 0 && !root.menus[idx].enabled)
+ while (idx >= 0 && !(root.menus[idx].enabled && root.menus[idx].visible))
idx--
if (idx >= 0) {
d.preselectMenuItem = true
@@ -203,7 +203,7 @@ MenuBarPrivate {
Keys.onRightPressed: {
if (d.openedMenuIndex !== -1 && d.openedMenuIndex < root.menus.length - 1) {
var idx = d.openedMenuIndex + 1
- while (idx < root.menus.length && !root.menus[idx].enabled)
+ while (idx < root.menus.length && !(root.menus[idx].enabled && root.menus[idx].visible))
idx++
if (idx < root.menus.length) {
d.preselectMenuItem = true