[gnome-music/wip/mschraal/file-exists-async: 7/12] 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: 7/12] defaulticon: Fix cache key
- Date: Sat, 4 Sep 2021 22:20:28 +0000 (UTC)
commit 93f0e9ace9ef8ee6a02f1ad9cb3067d3b2d1afda
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 8f904ec2f..0ce4da6ff 100644
--- a/gnomemusic/defaulticon.py
+++ b/gnomemusic/defaulticon.py
@@ -133,7 +133,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]