[gnome-music/wip/jfelder/artistview-fixes: 4/9] coremodel: Load the model only if the album is selected



commit 72436c025e0bde79ba5ab7fdf592dd9c15315ac4
Author: Jean Felder <jfelder src gnome org>
Date:   Tue Sep 10 15:38:43 2019 +0200

    coremodel: Load the model only if the album is selected
    
    This prevents loading the model when unselect_all is called from
    AlbumsView.

 gnomemusic/corealbum.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gnomemusic/corealbum.py b/gnomemusic/corealbum.py
index 30455742..70bce7fc 100644
--- a/gnomemusic/corealbum.py
+++ b/gnomemusic/corealbum.py
@@ -110,4 +110,5 @@ class CoreAlbum(GObject.GObject):
         # a selection. Trigger loading of the model here if a selection
         # is requested, it will trigger the filled model update as
         # well.
-        self.props.model.items_changed(0, 0, 0)
+        if self._selected is True:
+            self.props.model.items_changed(0, 0, 0)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]