diff --git a/scripts/Interface/ui/sans_isis/sans_data_processor_gui.py b/scripts/Interface/ui/sans_isis/sans_data_processor_gui.py index 02991dd007279110f16a5084361f889a4bf11ff5..deac02821a39202dc57c77da07826460d2f45afe 100644 --- a/scripts/Interface/ui/sans_isis/sans_data_processor_gui.py +++ b/scripts/Interface/ui/sans_isis/sans_data_processor_gui.py @@ -155,6 +155,10 @@ class SANSDataProcessorGui(QMainWindow, ui_sans_data_processor_window.Ui_SansDat def on_cut_rows(self): pass + @abstractmethod + def on_compatibility_unchecked(self): + pass + def __init__(self): """ Initialise the interface @@ -198,6 +202,8 @@ class SANSDataProcessorGui(QMainWindow, ui_sans_data_processor_window.Ui_SansDat self.delete_row_button.clicked.connect(self._remove_rows_requested_from_button) self.insert_row_button.clicked.connect(self._on_insert_button_pressed) + self.event_binning_group_box.clicked.connect(self.on_compatibility_unchecked) + # Attach validators self._attach_validators() @@ -460,6 +466,9 @@ class SANSDataProcessorGui(QMainWindow, ui_sans_data_processor_window.Ui_SansDat def _on_insert_button_pressed(self): self._call_settings_listeners(lambda listener: listener.on_insert_row()) + def _on_compatibility_unchecked(self): + self._call_settings_listeners(lambda listener: listener.on_compatibility_unchecked()) + def _on_help_button_clicked(self): pymantidplot.proxies.showCustomInterfaceHelp('ISIS SANS v2') @@ -1943,3 +1952,7 @@ class SANSDataProcessorGui(QMainWindow, ui_sans_data_processor_window.Ui_SansDat self.data_processor_table.hideColumn(15) self.data_processor_table.hideColumn(16) self.data_processor_table.hideColumn(17) + + def on_compatibility_unchecked(self): + if not self.event_binning_group_box.isChecked(): + self._on_compatibility_unchecked() diff --git a/scripts/Interface/ui/sans_isis/sans_data_processor_window.ui b/scripts/Interface/ui/sans_isis/sans_data_processor_window.ui index 88b83c11430b093df8e1897afd0e8bb876764b6c..eb5d96e228eb5b11570791d3017b0f72f73e1a4f 100644 --- a/scripts/Interface/ui/sans_isis/sans_data_processor_window.ui +++ b/scripts/Interface/ui/sans_isis/sans_data_processor_window.ui @@ -804,7 +804,11 @@ QGroupBox::title { </widget> </item> <item row="0" column="1"> - <widget class="QLineEdit" name="slice_event_line_edit"/> + <widget class="QLineEdit" name="slice_event_line_edit"> + <property name="enabled"> + <bool>true</bool> + </property> + </widget> </item> </layout> </item> @@ -814,10 +818,10 @@ QGroupBox::title { <item> <widget class="QGroupBox" name="event_binning_group_box"> <property name="enabled"> - <bool>true</bool> + <bool>false</bool> </property> <property name="toolTip"> - <string><html><head/><body><p>When checked, the data reduction will run in the compatibility mode. This means that the reduction workflow is equivalent to the previous legacy reduction workflow. </p><p>ONLY UNCHECK THIS IF NOT PERFORMING BIN MASKING</p></body></html></string> + <string><html><head/><body><p>When checked, the data reduction will run in the compatibility mode. This means that the reduction workflow is equivalent to the previous legacy reduction workflow. </p><p>Left checked as there exist known issues with non-compatibility mode. This will be fixed in future releases.</p></body></html></string> </property> <property name="title"> <string>&Use compatibility mode</string> @@ -831,9 +835,6 @@ QGroupBox::title { <layout class="QGridLayout" name="gridLayout_16"> <item row="0" column="0"> <widget class="QLabel" name="event_binning_label"> - <property name="enabled"> - <bool>true</bool> - </property> <property name="toolTip"> <string><html><head/><body><p>Rebin string for the initial time-of-flight workspace. This is only needed when using the compaptibility mode (ie when following the old reduction model). Note that this will only have an effect on event workspaces.</p></body></html></string> </property> @@ -844,9 +845,6 @@ QGroupBox::title { </item> <item row="0" column="1"> <widget class="QLineEdit" name="event_binning_line_edit"> - <property name="enabled"> - <bool>true</bool> - </property> <property name="toolTip"> <string><html><head/><body><p>Rebin string for the initial time-of-flight workspace. This is only needed when using the compaptibility mode (ie when following the old reduction model). Note that this will only have an effect on event workspaces.</p></body></html></string> </property> diff --git a/scripts/SANS/sans/gui_logic/presenter/run_tab_presenter.py b/scripts/SANS/sans/gui_logic/presenter/run_tab_presenter.py index 8045593f010d781a440838b5ded3698515bbc634..3ef69d9aad59b11c89c3a391bb875633f1a5880a 100644 --- a/scripts/SANS/sans/gui_logic/presenter/run_tab_presenter.py +++ b/scripts/SANS/sans/gui_logic/presenter/run_tab_presenter.py @@ -106,6 +106,9 @@ class RunTabPresenter(object): def on_sample_geometry_selection(self, show_geometry): self._presenter.on_sample_geometry_view_changed(show_geometry) + def on_compatibility_unchecked(self): + self._presenter.on_compatibility_unchecked() + class ProcessListener(WorkHandler.WorkListener): def __init__(self, presenter): super(RunTabPresenter.ProcessListener, self).__init__() @@ -536,6 +539,11 @@ class RunTabPresenter(object): else: self._view.hide_geometry() + def on_compatibility_unchecked(self): + self.display_warning_box('Warning', 'Are you sure you want to uncheck compatibility mode?', + 'Non-compatibility mode has known issues. DO NOT USE if applying bin masking' + ' to event workspaces.') + def get_row_indices(self): """ Gets the indices of row which are not empty.