diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-02-10 15:18:05 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-02-10 10:45:46 -0800 |
commit | 3912adfe5b8026cfea6afa382f0c5abe01135da4 (patch) | |
tree | 5bc56b7c47075ddd43ff707bd4c470f24e007b8b | |
parent | 194dd8bd976fc7599b429d31e0b6100e3f9a416f (diff) | |
download | subsurface-3912adfe5b8026cfea6afa382f0c5abe01135da4.tar.gz |
Save the size of the widgets to restore it later.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | qt-ui/mainwindow.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 076b982bf..a8e2d206f 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -1522,6 +1522,8 @@ void MainWindow::setApplicationState(const QByteArray& state) { if (!applicationState.keys().contains(state)) return; + QList<int> topSize = ui.topSplitter->sizes(); + QList<int> bottomSize = ui.bottomSplitter->sizes(); // yes, index is zero both times. please don't change it. if (ui.topSplitter->count() >= 2) { ui.topSplitter->widget(0)->setParent(NULL); @@ -1537,4 +1539,6 @@ void MainWindow::setApplicationState(const QByteArray& state) { ui.topSplitter->addWidget(curr.topRight); ui.bottomSplitter->addWidget(curr.bottomLeft); ui.bottomSplitter->addWidget(curr.bottomRight); + ui.topSplitter->setSizes(topSize); + ui.bottomSplitter->setSizes(bottomSize); } |