From e6a454d20c130cb2414d3f9eed1fd5ba73535aed Mon Sep 17 00:00:00 2001 From: James Crake-Merani Date: Tue, 17 Dec 2024 15:19:02 +0000 Subject: [PATCH 1/4] Change some names here. --- src/sas/qtgui/MainWindow/GuiManager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sas/qtgui/MainWindow/GuiManager.py b/src/sas/qtgui/MainWindow/GuiManager.py index e2ea5945f3..e9dd57b377 100644 --- a/src/sas/qtgui/MainWindow/GuiManager.py +++ b/src/sas/qtgui/MainWindow/GuiManager.py @@ -1331,12 +1331,12 @@ def updateTheoryFromPerspective(self, index): return per.currentTab.setTheoryItem(item) - def deleteIntermediateTheoryPlotsByModelID(self, model_id): + def deleteIntermediateTheoryPlotsByModelID(self, tab_id): """ Catch the signal to delete items in the Theory item model which correspond to a model ID. Send the request to the DataExplorer for updating the theory model. """ - self.filesWidget.deleteIntermediateTheoryPlotsByModelID(model_id) + self.filesWidget.deleteIntermediateTheoryPlotsByModelID(tab_id) def updateModelFromDataOperationPanel(self, new_item, new_datalist_item): """ From eafd2e0a423358e8075fe496b7576a09ebd7fd9d Mon Sep 17 00:00:00 2001 From: James Crake-Merani Date: Tue, 17 Dec 2024 15:19:31 +0000 Subject: [PATCH 2/4] Convert this into a string before emitting. --- src/sas/qtgui/Perspectives/Fitting/FittingWidget.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sas/qtgui/Perspectives/Fitting/FittingWidget.py b/src/sas/qtgui/Perspectives/Fitting/FittingWidget.py index 3a93a2cac8..3c48eea4e3 100644 --- a/src/sas/qtgui/Perspectives/Fitting/FittingWidget.py +++ b/src/sas/qtgui/Perspectives/Fitting/FittingWidget.py @@ -3301,7 +3301,7 @@ def complete1D(self, return_data): else: # delete theory items for the model, in order to get rid of any # redundant items, e.g. beta(Q), S_eff(Q) - self.communicate.deleteIntermediateTheoryPlotsSignal.emit(self.kernel_module.id) + self.communicate.deleteIntermediateTheoryPlotsSignal.emit(str(self.tab_id)) self._appendPlotsPolyDisp(new_plots, return_data, fitted_data) From 8ca736a075a3268e5990d9502b0f5415085cda1c Mon Sep 17 00:00:00 2001 From: James Crake-Merani Date: Tue, 17 Dec 2024 15:20:45 +0000 Subject: [PATCH 3/4] Updated method names. --- src/sas/qtgui/MainWindow/DataExplorer.py | 2 +- src/sas/qtgui/MainWindow/GuiManager.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sas/qtgui/MainWindow/DataExplorer.py b/src/sas/qtgui/MainWindow/DataExplorer.py index 3484817a6b..0f845155b4 100644 --- a/src/sas/qtgui/MainWindow/DataExplorer.py +++ b/src/sas/qtgui/MainWindow/DataExplorer.py @@ -2069,7 +2069,7 @@ def updateTheoryFromPerspective(self, model_item): self.theory_model.appendRow(model_item) return model_item - def deleteIntermediateTheoryPlotsByModelID(self, model_id): + def deleteIntermediateTheoryPlotsByTabId(self, tab_id): """Given a model's ID, deletes all items in the theory item model which reference the same ID. Useful in the case of intermediate results disappearing when changing calculations (in which case you don't want them to be retained in the list).""" diff --git a/src/sas/qtgui/MainWindow/GuiManager.py b/src/sas/qtgui/MainWindow/GuiManager.py index e9dd57b377..3dbfe5f88a 100644 --- a/src/sas/qtgui/MainWindow/GuiManager.py +++ b/src/sas/qtgui/MainWindow/GuiManager.py @@ -697,7 +697,7 @@ def addCallbacks(self): self.communicate.progressBarUpdateSignal.connect(self.updateProgressBar) self.communicate.perspectiveChangedSignal.connect(self.perspectiveChanged) self.communicate.updateTheoryFromPerspectiveSignal.connect(self.updateTheoryFromPerspective) - self.communicate.deleteIntermediateTheoryPlotsSignal.connect(self.deleteIntermediateTheoryPlotsByModelID) + self.communicate.deleteIntermediateTheoryPlotsSignal.connect(self.deleteIntermediateTheoryPlotsByTabId) self.communicate.plotRequestedSignal.connect(self.showPlot) self.communicate.plotFromNameSignal.connect(self.showPlotFromName) self.communicate.updateModelFromDataOperationPanelSignal.connect(self.updateModelFromDataOperationPanel) @@ -1331,7 +1331,7 @@ def updateTheoryFromPerspective(self, index): return per.currentTab.setTheoryItem(item) - def deleteIntermediateTheoryPlotsByModelID(self, tab_id): + def deleteIntermediateTheoryPlotsByTabId(self, tab_id): """ Catch the signal to delete items in the Theory item model which correspond to a model ID. Send the request to the DataExplorer for updating the theory model. From 3e888fd0aebc564510a75ccccc4926cb8cb48543 Mon Sep 17 00:00:00 2001 From: James Crake-Merani Date: Tue, 17 Dec 2024 15:22:59 +0000 Subject: [PATCH 4/4] Forgot to save this file :P --- src/sas/qtgui/MainWindow/GuiManager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sas/qtgui/MainWindow/GuiManager.py b/src/sas/qtgui/MainWindow/GuiManager.py index 3dbfe5f88a..e5f4150606 100644 --- a/src/sas/qtgui/MainWindow/GuiManager.py +++ b/src/sas/qtgui/MainWindow/GuiManager.py @@ -1336,7 +1336,7 @@ def deleteIntermediateTheoryPlotsByTabId(self, tab_id): Catch the signal to delete items in the Theory item model which correspond to a model ID. Send the request to the DataExplorer for updating the theory model. """ - self.filesWidget.deleteIntermediateTheoryPlotsByModelID(tab_id) + self.filesWidget.deleteIntermediateTheoryPlotsByTabId(tab_id) def updateModelFromDataOperationPanel(self, new_item, new_datalist_item): """