[vlc-devel] [PATCH 11/21] qml: ensure sibiling widget exist before navigating to them in VolumeWidget

Pierre Lamot pierre at videolabs.io
Wed Aug 7 15:52:17 CEST 2019


---
 modules/gui/qt/qml/player/VolumeWidget.qml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/qml/player/VolumeWidget.qml b/modules/gui/qt/qml/player/VolumeWidget.qml
index 2a13acda34..a4055ff972 100644
--- a/modules/gui/qt/qml/player/VolumeWidget.qml
+++ b/modules/gui/qt/qml/player/VolumeWidget.qml
@@ -70,8 +70,8 @@ FocusScope{
             Keys.onSpacePressed: player.muted = !player.muted
             Keys.onUpPressed: volControl.increase()
             Keys.onDownPressed: volControl.decrease()
-            Keys.onRightPressed: widgetfscope.KeyNavigation.right.forceActiveFocus()
-            Keys.onLeftPressed: widgetfscope.KeyNavigation.left.forceActiveFocus()
+            Keys.onRightPressed: if (widgetfscope.KeyNavigation.right) widgetfscope.KeyNavigation.right.forceActiveFocus()
+            Keys.onLeftPressed: if (widgetfscope.KeyNavigation.left) widgetfscope.KeyNavigation.left.forceActiveFocus()
 
             property color sliderColor: (volControl.position > fullvolpos) ? VLCStyle.colors.volmax : widgetfscope.color
             property int maxvol: 125
-- 
2.17.1



More information about the vlc-devel mailing list