[vlc-devel] [PATCH 12/29] qml: fix focusIndex not found when closing contextMenu

Abel Tesfaye abeltesfaye45 at gmail.com
Tue Aug 20 12:42:29 CEST 2019


From: Abel Tesfaye <Abeltesfaye45 at gmail.com>

---
 modules/gui/qt/qml/utils/ListItem.qml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/gui/qt/qml/utils/ListItem.qml b/modules/gui/qt/qml/utils/ListItem.qml
index 1e58d944ed..891e518b94 100644
--- a/modules/gui/qt/qml/utils/ListItem.qml
+++ b/modules/gui/qt/qml/utils/ListItem.qml
@@ -197,17 +197,17 @@ NavigableFocusScope {
                     }
                 }
                 Keys.onLeftPressed: {
-                    if (focusIndex === 0)
+                    if (toolButtons.focusIndex === 0)
                         presentation.focus = true
                     else {
-                        focusIndex -= 1
+                        toolButtons.focusIndex -= 1
                     }
                 }
                 Keys.onRightPressed: {
-                if (focusIndex === (actionButtons.length - !root.showContextButton ? 1 : 0 ) )
+               if (toolButtons.focusIndex === (actionButtons.length - (!root.showContextButton ? 1 : 0) ) )
                         root.actionRight(0)
                     else {
-                        focusIndex += 1
+                        toolButtons.focusIndex += 1
                     }
                 }
             }
-- 
2.21.0



More information about the vlc-devel mailing list