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



commit 7d602a63789f98e7fc14b7e018fe4bd2de85f5e9
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]