fix: order sample count columns by workflow, unwire crossed columns
Both bottom-dock tables now list mount -> raster -> screening -> rotation, the order the work actually happens in. In the Auxiliary table the swap also fixes a real bug: data() feeds get_entry header-index-minus-1, but rotation/raster were crossed against the header, so 'Raster count' displayed rotation counts and vice versa. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user