[gnome-music/wip/mschraal/tracker-only-features: 27/30] coreartist: Limit items changed calls



commit c92e03359b694346721e8b4d86f827f313eb1bee
Author: Marinus Schraal <mschraal gnome org>
Date:   Wed Aug 7 12:35:40 2019 +0200

    coreartist: Limit items changed calls
    
    Only do an items-changed trigger when selected property changes instead.

 gnomemusic/coreartist.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/gnomemusic/coreartist.py b/gnomemusic/coreartist.py
index ff0762d9..96b92d83 100644
--- a/gnomemusic/coreartist.py
+++ b/gnomemusic/coreartist.py
@@ -62,8 +62,6 @@ class CoreArtist(GObject.GObject):
                 self.props.media)
             self._model.connect("items-changed", self._on_items_changed)
 
-        self._on_items_changed(self._model, None, None, None)
-
         return self._model
 
     def _on_items_changed(self, model, pos, removed, added):
@@ -84,7 +82,7 @@ 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
+        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]