[vlc-commits] qml: set the initial selected entry in player menu
Pierre Lamot
git at videolan.org
Tue Nov 19 16:49:54 CET 2019
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Wed Oct 30 11:00:18 2019 +0100| [51fc2ede62059241707df290477fdda099c9e2fe] | committer: Jean-Baptiste Kempf
qml: set the initial selected entry in player menu
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=51fc2ede62059241707df290477fdda099c9e2fe
---
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: {
More information about the vlc-commits
mailing list