mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 23:03:23 +00:00
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>
This commit is contained in:
parent
194dd8bd97
commit
3912adfe5b
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue