diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-01-27 22:06:41 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-02-06 10:00:39 -0800 |
commit | aefbde93ce161c08b4aca31aee4e3fc45ab72003 (patch) | |
tree | 0188e6c41a6996ef4216e419cdb0e59b96f4e062 /desktop-widgets/mainwindow.h | |
parent | c584e28f2e0cc97cb2573d66697fdb0c0f160b66 (diff) | |
download | subsurface-aefbde93ce161c08b4aca31aee4e3fc45ab72003.tar.gz |
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 <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/mainwindow.h')
-rw-r--r-- | desktop-widgets/mainwindow.h | 4 |
1 files changed, 2 insertions, 2 deletions
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<LocationInformationWidget> 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; |