[vlc-devel] [PATCH 04/10] qml: set the initial selected entry in player menu
Pierre Lamot
pierre at videolabs.io
Mon Nov 18 18:14:07 CET 2019
---
modules/gui/qt/qml/player/PlayerMenu.qml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/modules/gui/qt/qml/player/PlayerMenu.qml b/modules/gui/qt/qml/player/PlayerMenu.qml
index acfb8f92a5..66fb88d6f2 100644
--- a/modules/gui/qt/qml/player/PlayerMenu.qml
+++ b/modules/gui/qt/qml/player/PlayerMenu.qml
@@ -51,6 +51,13 @@ T.Menu {
onOpened: {
control._emitMenuClose = true
+
+ for (var i = 0; i < control.count; i++) {
+ if (control.itemAt(i).enabled) {
+ control.currentIndex = i
+ break
+ }
+ }
}
onClosed: {
--
2.17.1
More information about the vlc-devel
mailing list