Skip to content

Commit 4b5c855

Browse files
committed
Fix exception at deleting the second Fit.
During deletion of the second Fit the onTreeSelChanged handler got triggered by the last dataset from fit1, but GetSelections() list gave fit2. This caused the GUI to use the Fitting object (selections) for updating dataset panel (from event). Solution: Ignore type of the node that triggered onTreeSelChanged. Only use the GetSelections() nodes for updating right-side panel.
1 parent d3c5446 commit 4b5c855

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

diffpy/pdfgui/gui/mainframe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,7 @@ def treeSelectionUpdate(self, node):
11031103
#return
11041104
elif len(selections) == 1:
11051105
self.rightPanel.Enable()
1106-
selectiontype = self.treeCtrlMain.GetNodeType(node)
1106+
selectiontype = self.treeCtrlMain.GetNodeType(selections[0])
11071107
self.switchRightPanel(selectiontype)
11081108
else:
11091109
self.rightPanel.Enable(False)

0 commit comments

Comments
 (0)