[gnome-music/wip/jfelder/artistview-fixes: 3/9] coreartist: Load the model only if the artist is selected



commit 276b04d1e9229637977ddfa8deeabaaa70f3f09f
Author: Jean Felder <jfelder src gnome org>
Date:   Tue Sep 10 12:42:42 2019 +0200

    coreartist: Load the model only if the artist is selected
    
    This prevents loading the model when unselect_all is called from
    ArtistsView.

 gnomemusic/coreartist.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gnomemusic/coreartist.py b/gnomemusic/coreartist.py
index 96b92d83..2832a979 100644
--- a/gnomemusic/coreartist.py
+++ b/gnomemusic/coreartist.py
@@ -82,7 +82,8 @@ class CoreArtist(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)
 
     @GObject.Property(type=str, default=None)
     def thumbnail(self):


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