From 5227aac999a7599b33da773724b9a45a8d63169c Mon Sep 17 00:00:00 2001 From: Nils <> Date: Tue, 22 Feb 2022 21:21:59 +0100 Subject: [PATCH] protect against default qt keybinding that crashes the tree view --- qtgui/instrument.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qtgui/instrument.py b/qtgui/instrument.py index 920b7b6..63e0b61 100644 --- a/qtgui/instrument.py +++ b/qtgui/instrument.py @@ -113,7 +113,8 @@ class InstrumentTreeController(object): def itemExpandedOrCollapsed(self, libraryItem:QtWidgets.QTreeWidgetItem): - api.session.guiSharedDataToSave["libraryIsExpanded"][libraryItem.id] = libraryItem.isExpanded() + if type(libraryItem) is GuiLibrary : #just in case + api.session.guiSharedDataToSave["libraryIsExpanded"][libraryItem.id] = libraryItem.isExpanded() def itemSelectionChanged(self): """Only one instrument can be selected at the same time.