[gnome-music/wip/mschraal/asyncqueue-fix-cover-cycling: 3/3] artstack: Set default icon on coreobject change




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