Commit 2ba56f9f authored by Conor Finn's avatar Conor Finn Committed by Conor Finn
Browse files

Revert "Check if GUIs Need to Keep Running When Closing Workbench"

parent 8cb8451f
......@@ -40,7 +40,6 @@ Bugfixes
- Fixed a bug with autoscaling of colorfill plots from within the figure options.
- Fixed an issue to plot negative values with logarithm scaling in slice view.
- Workbench will no longer hang if an algorithm was running when workbench was closed.
- Stopped workbench from ignoring GUIs that want to cancel closing
- Fixed a bug in the editor where uncommenting using 'ctrl+/' wasn't working correctly for lines of the form '<optional whitespace>#code_here # inline comment'.
:ref:`Release 6.3.0 <v6.3.0>`
......@@ -577,17 +577,8 @@ class MainWindow(QMainWindow):
# Close windows
app = QApplication.instance()
if app is not None:
for window in app.topLevelWindows():
if not window.close():
# Allow GUIs to cancel the closure if they want to save
# Close editors
if self.editor is None or (self.editor.editors.current_editor() and self.editor.app_closing()):
if self.editor is None or self.editor.app_closing():
# write out any changes to the mantid config file
# write current window information to global settings object
......@@ -597,13 +588,13 @@ class MainWindow(QMainWindow):
import matplotlib.pyplot as plt # noqa
# Close any remaining windows
if app is not None:
# Cancel all running (managed) algorithms
app = QApplication.instance()
if app is not None:
# Kill the project recovery thread and don't restart should a save be in progress and clear out current
# recovery checkpoint as it is closing properly
if self.project_recovery is not None:
......@@ -245,20 +245,6 @@ class MainWindowTest(unittest.TestCase):
def test_main_window_does_not_close_if_gui_ignores_event(self, mock_q_app):
mock_event = Mock()
mock_window = Mock()
mock_window.close = Mock(return_value=False) # Close event was ignored (user cancelled)
mock_app = Mock()
mock_q_app.instance = Mock(return_value=mock_app)
mock_app.topLevelWindows = Mock(return_value=[mock_window])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment