[vlc-commits] qml: reset viewProperties when changing view

Pierre Lamot git at videolan.org
Fri Feb 14 12:00:02 CET 2020


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Thu Jan 30 13:35:22 2020 +0100| [277f955a393b48c86e061d1d29eb8f472a86c7f4] | committer: Jean-Baptiste Kempf

qml: reset viewProperties when changing view

  when changing view, viewProperties from the previous view may be applied
  on the new view.

  for instance, when navigating from genre > album(filtered with genre) >
  tracks the track list ended up filtered by the genre of the previous view

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=277f955a393b48c86e061d1d29eb8f472a86c7f4
---

 modules/gui/qt/medialibrary/qml/MainDisplay.qml  | 5 ++++-
 modules/gui/qt/medialibrary/qml/MusicDisplay.qml | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/medialibrary/qml/MainDisplay.qml b/modules/gui/qt/medialibrary/qml/MainDisplay.qml
index 07c8ba5681..b346d409c2 100644
--- a/modules/gui/qt/medialibrary/qml/MainDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/MainDisplay.qml
@@ -36,7 +36,10 @@ Widgets.NavigableFocusScope {
     property string view: ""
     property var viewProperties: ({})
 
-    onViewChanged: loadView()
+    onViewChanged: {
+        viewProperties = ({})
+        loadView()
+    }
     onViewPropertiesChanged: loadView()
     Component.onCompleted: {
         loadView()
diff --git a/modules/gui/qt/medialibrary/qml/MusicDisplay.qml b/modules/gui/qt/medialibrary/qml/MusicDisplay.qml
index 54363d0450..3254452da2 100644
--- a/modules/gui/qt/medialibrary/qml/MusicDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/MusicDisplay.qml
@@ -37,7 +37,10 @@ Widgets.NavigableFocusScope {
     property var sortModel
     property var contentModel
 
-    onViewChanged: loadView()
+    onViewChanged: {
+        viewProperties = ({})
+        loadView()
+    }
     onViewPropertiesChanged: loadView()
     Component.onCompleted: loadView()
 



More information about the vlc-commits mailing list