diff --git a/qt/applications/workbench/workbench/widgets/plotselector/view.py b/qt/applications/workbench/workbench/widgets/plotselector/view.py index a7795f870788f930731befea278b9492655a6179..d14d7bde83cbc65c1daab05bd809357802d15663 100644 --- a/qt/applications/workbench/workbench/widgets/plotselector/view.py +++ b/qt/applications/workbench/workbench/widgets/plotselector/view.py @@ -167,17 +167,11 @@ class PlotSelectorView(QWidget): """ table_widget = QTableWidget(0, 3, self) table_widget.setHorizontalHeaderLabels(['No.', 'Plot Name', 'Last Active Order (hidden)']) - if not DEBUG_MODE: - # Setting the column to be hidden seems to fail on Mac, - # so make double sure and set the column width to 0 here - table_widget.setColumnWidth(Column.LastActive, True) - table_widget.setColumnHidden(Column.LastActive, True) + table_widget.verticalHeader().setVisible(False) # Fix the size of 'No.' and let 'Plot Name' fill the space top_header = table_widget.horizontalHeader() - top_header.resizeSection(Column.Number, top_header.sectionSizeHint(Column.Number)) - top_header.setSectionResizeMode(Column.Name, QHeaderView.Stretch) table_widget.horizontalHeaderItem(Column.Number).setToolTip('This is the matplotlib figure number.\n\nFrom a ' 'script use plt.figure(N), where N is this figure ' @@ -194,6 +188,12 @@ class PlotSelectorView(QWidget): table_widget.horizontalHeader().sectionClicked.connect(self.update_sort_menu_selection) + if not DEBUG_MODE: + table_widget.setColumnHidden(Column.LastActive, True) + + top_header.resizeSection(Column.Number, top_header.sectionSizeHint(Column.Number)) + top_header.setSectionResizeMode(Column.Name, QHeaderView.Stretch) + return table_widget def _make_context_menu(self):