summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mainwindow.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-01-27 22:06:41 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-02-06 10:00:39 -0800
commitaefbde93ce161c08b4aca31aee4e3fc45ab72003 (patch)
tree0188e6c41a6996ef4216e419cdb0e59b96f4e062 /desktop-widgets/mainwindow.h
parentc584e28f2e0cc97cb2573d66697fdb0c0f160b66 (diff)
downloadsubsurface-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.h4
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;