Skip to content

Commit 4eca88f

Browse files
committed
PICARD-3234: Fix columns being restored with 0 width
When loading the stored columns setting invisible columns would be set to a width of 0. This would call issues with columns not being shown after enabling them. Set the width to the default column width if it would be 0.
1 parent 52a0f00 commit 4eca88f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

picard/ui/widgets/configurablecolumnsheader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ def restore_columns_state(self, state: dict[str, dict]):
348348
QtWidgets.QHeaderView.ResizeMode.Fixed.value,
349349
QtWidgets.QHeaderView.ResizeMode.Interactive.value,
350350
}:
351-
self.resizeSection(i, column_state.get('width', column.width or 100))
351+
self.resizeSection(i, column_state.get('width', 0) or column.width or 100)
352352

353353
# Sort indicator uses logical index, independent of visual positioning
354354
if 'sorted' in column_state:

0 commit comments

Comments
 (0)