[gnome-music/wip/mschraal/rework-art-widget: 8/26] artstack: Set default icon on coreobject change




commit c85cae9a9114e66a9e0bd25cec9722118aec02f9
Author: Marinus Schraal <mschraal gnome org>
Date:   Fri Mar 18 10:12:20 2022 +0100

    artstack: Set default icon on coreobject change
    
    Make sure no old icon lingers before a new one can be loaded by showing
    the placeholder icon.

 gnomemusic/widgets/artstack.py | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/gnomemusic/widgets/artstack.py b/gnomemusic/widgets/artstack.py
index 19fd2f9f4..c6f352a6a 100644
--- a/gnomemusic/widgets/artstack.py
+++ b/gnomemusic/widgets/artstack.py
@@ -139,6 +139,9 @@ class ArtStack(Gtk.Stack):
 
         self._disconnect_cache()
 
+        default_icon = DefaultIcon(self).get(self._art_type, self._size)
+        self._swap_thumbnails(default_icon, False)
+
         if self._thumbnail_id != 0:
             self._coreobject.disconnect(self._thumbnail_id)
             self._thumbnail_id = 0


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