Skip to content
Snippets Groups Projects
Commit 82f7e835 authored by Tom Titcombe's avatar Tom Titcombe
Browse files

Only update sample shape from file information if it is empty

Refs #23961
parent 6c476c50
No related branches found
No related tags found
No related merge requests found
...@@ -188,7 +188,8 @@ class TableModel(object): ...@@ -188,7 +188,8 @@ class TableModel(object):
self._table_entries[row].update_attribute('sample_thickness', rounded_file_thickness) self._table_entries[row].update_attribute('sample_thickness', rounded_file_thickness)
self._table_entries[row].update_attribute('sample_height', rounded_file_height) self._table_entries[row].update_attribute('sample_height', rounded_file_height)
self._table_entries[row].update_attribute('sample_width', rounded_file_width) self._table_entries[row].update_attribute('sample_width', rounded_file_width)
self._table_entries[row].update_attribute('sample_shape', file_information.get_shape()) if self.table_entries[row].sample_shape_string == "":
self._table_entries[row].update_attribute('sample_shape', file_information.get_shape())
self._table_entries[row].file_finding = False self._table_entries[row].file_finding = False
self.reset_row_state(row) self.reset_row_state(row)
...@@ -470,6 +471,7 @@ class SampleShapeColumnModel(object): ...@@ -470,6 +471,7 @@ class SampleShapeColumnModel(object):
shape_enum_string = SampleShapeColumnModel.SAMPLE_SHAPES_DICT[shape] shape_enum_string = SampleShapeColumnModel.SAMPLE_SHAPES_DICT[shape]
self.sample_shape = SampleShape.from_string(shape_enum_string) self.sample_shape = SampleShape.from_string(shape_enum_string)
self.sample_shape_string = shape_enum_string self.sample_shape_string = shape_enum_string
break
@staticmethod @staticmethod
def get_hint_strategy(): def get_hint_strategy():
......
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