From 42e07a3b14bf5078e20665fcee9c4ffd75b7e269 Mon Sep 17 00:00:00 2001 From: Charles Haley Date: Mon, 13 Nov 2023 15:59:37 +0000 Subject: [PATCH] Small optimization of commit b43a329 --- src/calibre/gui2/tag_browser/ui.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/calibre/gui2/tag_browser/ui.py b/src/calibre/gui2/tag_browser/ui.py index 69acf5335c..17bece8523 100644 --- a/src/calibre/gui2/tag_browser/ui.py +++ b/src/calibre/gui2/tag_browser/ui.py @@ -57,8 +57,7 @@ class TagBrowserMixin: # {{{ return '' def get_icon(cat_name): - from calibre.gui2.ui import get_gui - icon = get_gui().tags_view.model().category_custom_icons.get(cat_name, None) + icon = self.tags_view.model().category_custom_icons.get(cat_name, None) if not icon: from calibre.library.field_metadata import category_icon_map icon = QIcon.ic(category_icon_map.get(cat_name) or category_icon_map['custom:'])