From af50db9fd36bd73c819db0ca99cf9c783ca7ab96 Mon Sep 17 00:00:00 2001 From: RumovZ Date: Fri, 28 May 2021 17:46:46 +0200 Subject: [PATCH] Fix restoring current sidebar element for cards --- qt/aqt/browser/sidebar/item.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qt/aqt/browser/sidebar/item.py b/qt/aqt/browser/sidebar/item.py index d38e8a7c4..41e7fe7a0 100644 --- a/qt/aqt/browser/sidebar/item.py +++ b/qt/aqt/browser/sidebar/item.py @@ -140,6 +140,11 @@ class SidebarItem: return self.full_name == other.full_name elif self.item_type == SidebarItemType.SAVED_SEARCH: return self.name == other.name + elif self.item_type == SidebarItemType.NOTETYPE_TEMPLATE: + return ( + other.id == self.id + and other._parent_item.id == self._parent_item.id + ) else: return other.id == self.id