mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 21:13:23 +00:00
Fix loading the information of splitter sizes on empty config.
We previously did did bad things when running with an empty configuration. This attemps to clean it. We will now correctly handle the splitters in almost all cases ( if I didn't break anything on the way. ) Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b98157a519
commit
d06e6b7d20
1 changed files with 2 additions and 3 deletions
|
@ -420,7 +420,7 @@ void MainWindow::on_actionViewAll_triggered()
|
|||
}
|
||||
|
||||
void MainWindow::beginChangeState(CurrentState s){
|
||||
if (state == VIEWALL){
|
||||
if (state == VIEWALL && state != s){
|
||||
saveSplitterSizes();
|
||||
}
|
||||
state = s;
|
||||
|
@ -566,12 +566,11 @@ void MainWindow::initialUiSetup()
|
|||
{
|
||||
QSettings settings;
|
||||
int i;
|
||||
|
||||
settings.beginGroup("MainWindow");
|
||||
QSize sz = settings.value("size", qApp->desktop()->size()).value<QSize>();
|
||||
resize(sz);
|
||||
|
||||
CurrentState state = (CurrentState) settings.value("lastState", 0).toInt();
|
||||
state = (CurrentState) settings.value("lastState", 0).toInt();
|
||||
switch(state){
|
||||
case VIEWALL: on_actionViewAll_triggered(); break;
|
||||
case GLOBE_MAXIMIZED : on_actionViewGlobe_triggered(); break;
|
||||
|
|
Loading…
Add table
Reference in a new issue