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.