diff --git a/qt/python/mantidqt/widgets/tableworkspacedisplay/model.py b/qt/python/mantidqt/widgets/tableworkspacedisplay/model.py index 012b2a9ff1d6f764bc937c7d81de20698ddff119..a24729795b5d36f40d6e2cafd39fca7e6ae81228 100644 --- a/qt/python/mantidqt/widgets/tableworkspacedisplay/model.py +++ b/qt/python/mantidqt/widgets/tableworkspacedisplay/model.py @@ -107,7 +107,8 @@ class TableWorkspaceDisplayModel: def sort(self, column_index, sort_ascending): column_name = self.ws.getColumnNames()[column_index] if self.is_peaks_workspace(): - SortPeaksWorkspace(self.ws, ColumnNameToSortBy=column_name, SortAscending=sort_ascending) + SortPeaksWorkspace(InputWorkspace=self.ws, OutputWorkspace=self.ws, ColumnNameToSortBy=column_name, + SortAscending=sort_ascending) else: - SortTableWorkspace(InputWorkspace=self.ws, OutputWorkspace=self.ws, Columns=[column_name], - Ascending=[sort_ascending]) + SortTableWorkspace(InputWorkspace=self.ws, OutputWorkspace=self.ws, Columns=column_name, + Ascending=sort_ascending) diff --git a/qt/python/mantidqt/widgets/tableworkspacedisplay/presenter.py b/qt/python/mantidqt/widgets/tableworkspacedisplay/presenter.py index f580f36f5d6afb471a85c4bf57c412e11de827d0..f80689987ffd34338ef87b520abb95ecf5a9f1ad 100644 --- a/qt/python/mantidqt/widgets/tableworkspacedisplay/presenter.py +++ b/qt/python/mantidqt/widgets/tableworkspacedisplay/presenter.py @@ -56,7 +56,7 @@ class TableWorkspaceDisplay(ObservingPresenter): """ self.model = model if model else TableWorkspaceDisplayModel(ws) - self.name = self.model.get_name() if name is None else name + self.name = name if name else self.model.get_name() self.view = view if view else TableWorkspaceDisplayView(self, parent, self.name) self.parent = parent self.plot = plot @@ -83,6 +83,9 @@ class TableWorkspaceDisplay(ObservingPresenter): def replace_workspace(self, workspace_name, workspace): if self.model.workspace_equals(workspace_name): self.model = TableWorkspaceDisplayModel(workspace) + # block signals to prevent triggering of handleItemChanged event + # which causes an infinite recursion and a stack overflow error + self.view.blockSignals(True) self.load_data(self.view) self.view.emit_repaint()