From aefbde93ce161c08b4aca31aee4e3fc45ab72003 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Wed, 27 Jan 2021 22:06:41 +0100 Subject: desktop: be smarter about filling splitters On state change, the splitters were completely emptied and refilled. Instead try to reuse already existing splitter slots. This reduces annoying flickering. Signed-off-by: Berthold Stoeger --- desktop-widgets/mainwindow.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'desktop-widgets/mainwindow.h') diff --git a/desktop-widgets/mainwindow.h b/desktop-widgets/mainwindow.h index 617e53a09..ae8e11740 100644 --- a/desktop-widgets/mainwindow.h +++ b/desktop-widgets/mainwindow.h @@ -184,7 +184,6 @@ private: void saveSplitterSizes(); void restoreSplitterSizes(); void updateLastUsedDir(const QString &s); - void clearSplitters(); bool filesAsArguments; UpdateManager *updateManager; std::unique_ptr diveSiteEdit; @@ -220,7 +219,8 @@ private: Quadrants applicationState[(size_t)ApplicationState::Count]; static void addWidgets(const Quadrant &); bool userMayChangeAppState() const; - void setQuadrantWidget(const Quadrant &q, QSplitter &splitter); + void setQuadrantWidget(QSplitter &splitter, const Quadrant &q, int pos); + void setQuadrantWidgets(QSplitter &splitter, const Quadrant &left, const Quadrant &right); void registerApplicationState(ApplicationState state, Quadrants q); QMenu *connections; -- cgit v1.2.3-70-g09d2