From 2290a1652dc9703902f017569cf458dc62e438f5 Mon Sep 17 00:00:00 2001 From: RumovZ Date: Mon, 17 May 2021 20:13:45 +0200 Subject: [PATCH] Set column sizes and indicator after state change --- qt/aqt/browser/table/table.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qt/aqt/browser/table/table.py b/qt/aqt/browser/table/table.py index c2293068a..ed3a7dd6e 100644 --- a/qt/aqt/browser/table/table.py +++ b/qt/aqt/browser/table/table.py @@ -255,6 +255,8 @@ class Table: def _restore_header(self) -> None: self._view.horizontalHeader().blockSignals(True) restoreHeader(self._view.horizontalHeader(), self._state.config_key_prefix) + self._set_column_sizes() + self._set_sort_indicator() self._view.horizontalHeader().blockSignals(False) # Setup @@ -303,8 +305,6 @@ class Table: hh.setSectionsMovable(True) hh.setContextMenuPolicy(Qt.CustomContextMenu) self._restore_header() - self._set_column_sizes() - self._set_sort_indicator() qconnect(hh.customContextMenuRequested, self._on_header_context) qconnect(hh.sortIndicatorChanged, self._on_sort_column_changed) qconnect(hh.sectionMoved, self._on_column_moved)