diff options
author | Anne Jan Brouwer <brouwer@annejan.com> | 2015-07-08 21:51:40 +0200 |
---|---|---|
committer | Anne Jan Brouwer <annejan@noprotocol.com> | 2015-07-08 21:51:40 +0200 |
commit | d9225cd6dce581e6eaf77deaf4dd7a11a613a954 (patch) | |
tree | 94a30c988a611e639aaab7d0e53d7b6df43c988e | |
parent | 5252f69dbf316984d30207dfc68fc452fd78946e (diff) |
don't set on first run
-rw-r--r-- | mainwindow.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp index 39da92a4..a86eccd2 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -143,9 +143,11 @@ bool MainWindow::checkConfig() { QList<int> splitter = ui->splitter->sizes(); int left = settings.value("splitterLeft", splitter[0]).toInt(); int right= settings.value("splitterRight", splitter[1]).toInt(); - splitter[0] = left != 0 ? left : splitter[0]; - splitter[1] = right != 0 ? right : splitter[1]; - ui->splitter->setSizes(splitter); + if (left > 0 || right > 0) { + splitter[0] = left; + splitter[1] = right; + ui->splitter->setSizes(splitter); + } if ( settings.value( "maximized", isMaximized() ).toBool() ) showMaximized(); settings.endGroup(); |