Skip to content
Snippets Groups Projects
Commit 272bbee1 authored by Matthew Andrew's avatar Matthew Andrew
Browse files

Added detector list validation Re #23642

parent 28e58c73
No related branches found
No related tags found
No related merge requests found
......@@ -50,7 +50,8 @@ class GroupingTablePresenter(object):
return True
def validate_detector_ids(self, text):
if re.match(run_utils.run_string_regex, text):
# detector_list = run_utils.run_string_to_list(text)
if re.match(run_utils.run_string_regex, text) and max(run_utils.run_string_to_list(text)) <= self._model._data.num_detectors:
return True
self._view.warning_popup("Invalid detector list.")
return False
......@@ -119,6 +120,7 @@ class GroupingTablePresenter(object):
try:
self.update_model_from_view()
except ValueError as error:
self._model.remove_pairs_with_removed_name(self._view.get_table_item_text(row, 0))
self._view.warning_popup(error)
self.update_view_from_model()
......
......@@ -149,7 +149,7 @@ DEFAULT_OUTPUTS = ["OutputWorkspace",
"FirstGoodData",
"MainFieldDirection"]
# List of default values for the DEFAULT_OUTPUTS list
DEFAULT_OUTPUT_VALUES = [__default_workspace(),
DEFAULT_OUTPUT_VALUES = [[__default_workspace()],
None, # api.WorkspaceFactoryImpl.Instance().createTable("TableWorkspace"),
api.WorkspaceFactoryImpl.Instance().createTable("TableWorkspace"),
0.0,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment