diff --git a/src/aare/gui/models/user_sample_model.py b/src/aare/gui/models/user_sample_model.py index 207234a5..8d8fc512 100644 --- a/src/aare/gui/models/user_sample_model.py +++ b/src/aare/gui/models/user_sample_model.py @@ -40,9 +40,9 @@ def get_entry(sample: SampleShortInfo, column: int): elif column == 8: return sample.raster_count elif column == 9: - return sample.rotation_count - elif column == 10: return sample.screening_count + elif column == 10: + return sample.rotation_count elif column == 11: return sample.comment return "" @@ -70,8 +70,10 @@ class UserSampleSpreadsheet(QAbstractTableModel): "User", "Mount count", "Raster count", - "Rotation count", + # Workflow order: a sample is screened before rotation data is + # collected, so Screening sits left of Rotation. "Screening count", + "Rotation count", "Comment", ] self.current_sample = current_sample diff --git a/src/aare/gui/panels/reference_tools_panel.py b/src/aare/gui/panels/reference_tools_panel.py index 8710db23..6095a3ab 100644 --- a/src/aare/gui/panels/reference_tools_panel.py +++ b/src/aare/gui/panels/reference_tools_panel.py @@ -20,12 +20,16 @@ def get_entry(sample: SampleShortInfo, column: int): return sample.sample_name elif column == 2: return sample.mount_count + # data() feeds this `header index - 1`: rotation/raster were cross-wired + # against the header, so "Raster count" showed rotation counts and vice + # versa. Order now matches the header (workflow order, same as the Dewar + # table): mount -> raster -> screening -> rotation. elif column == 3: - return sample.rotation_count - elif column == 4: return sample.raster_count - elif column == 5: + elif column == 4: return sample.screening_count + elif column == 5: + return sample.rotation_count return "" @@ -48,8 +52,8 @@ class ReferenceToolsModel(QAbstractTableModel): "Sample name", "Mount count", "Raster count", - "Rotation count", "Screening count", + "Rotation count", ] self._sort_col = 1 self._sort_order = Qt.SortOrder.AscendingOrder