[vlc-commits] [Git][videolan/vlc][master] qml: do not push the same view to the navigation stack
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Sat Aug 5 09:04:37 UTC 2023
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
a5b564b7 by Fatih Uzunoglu at 2023-08-05T08:44:34+00:00
qml: do not push the same view to the navigation stack
- - - - -
4 changed files:
- modules/gui/qt/maininterface/qml/MainDisplay.qml
- modules/gui/qt/medialibrary/qml/MusicDisplay.qml
- modules/gui/qt/medialibrary/qml/VideoDisplay.qml
- modules/gui/qt/network/qml/DiscoverDisplay.qml
Changes:
=====================================
modules/gui/qt/maininterface/qml/MainDisplay.qml
=====================================
@@ -270,6 +270,9 @@ FocusScope {
plListView: playlist
onItemClicked: {
+ if (selectedIndex === index)
+ return
+
const name = g_mainDisplay.tabModel.get(index).name
selectedIndex = index
if (_oldViewProperties[name] === undefined)
=====================================
modules/gui/qt/medialibrary/qml/MusicDisplay.qml
=====================================
@@ -89,6 +89,11 @@ Widgets.PageLoader {
currentView: root.view
model: tabModel
- onClicked: root.loadIndex(index)
+ onClicked: {
+ if (root.pageModel[index].name === currentView.name)
+ return
+
+ root.loadIndex(index)
+ }
}
}
=====================================
modules/gui/qt/medialibrary/qml/VideoDisplay.qml
=====================================
@@ -57,7 +57,12 @@ Widgets.PageLoader {
model: tabModel
- onClicked: root.loadIndex(index)
+ onClicked: {
+ if (root.pageModel[index].name === currentView.name)
+ return
+
+ root.loadIndex(index)
+ }
}
//---------------------------------------------------------------------------------------------
=====================================
modules/gui/qt/network/qml/DiscoverDisplay.qml
=====================================
@@ -85,7 +85,12 @@ Widgets.PageLoader {
currentView: root.view
model: tabModel
- onClicked: root.loadIndex(index)
+ onClicked: {
+ if (root.pageModel[index].name === currentView.name)
+ return
+
+ root.loadIndex(index)
+ }
}
}
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a5b564b7eeeae211beb590984bcbf8df22a182b6
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a5b564b7eeeae211beb590984bcbf8df22a182b6
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list