[gnome-music/wip/mschraal/file-exists-async: 3/3] defaulticon: Fix cache key
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/file-exists-async: 3/3] defaulticon: Fix cache key
- Date: Tue, 17 Aug 2021 14:56:27 +0000 (UTC)
commit 60f6a8396405b8de081a72624730779f541d8488
Author: Marinus Schraal <mschraal gnome org>
Date: Tue Aug 17 16:48:57 2021 +0200
defaulticon: Fix cache key
The dict key was not uniquely used with the round_shape variable. This
resulted in some unneeded refreshes of the defaulticon cache.
gnomemusic/defaulticon.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gnomemusic/defaulticon.py b/gnomemusic/defaulticon.py
index 5af8769b7..9bb2ed0d7 100644
--- a/gnomemusic/defaulticon.py
+++ b/gnomemusic/defaulticon.py
@@ -136,7 +136,7 @@ class DefaultIcon(GObject.GObject):
else:
round_shape = True
- if (icon_type, art_size, scale) not in self._cache.keys():
+ if (icon_type, art_size, scale, round_shape) not in self._cache.keys():
new_icon = self._make_default_icon(
icon_type, art_size, scale, round_shape)
self._cache[(icon_type, art_size, scale, round_shape)] = new_icon
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]