diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 12c71024a..7ad4afc73 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -641,14 +641,20 @@ void MainWindow::saveWidgetState( QWidget * _w, QDomElement & _de ) _w = _w->parentWidget(); } - _de.setAttribute( "x", _w->x() ); - _de.setAttribute( "y", _w->y() ); _de.setAttribute( "visible", _w->isVisible() ); _de.setAttribute( "minimized", _w->isMinimized() ); _de.setAttribute( "maximized", _w->isMaximized() ); + bool maxed = _w->isMaximized(); + bool mined = _w->isMinimized(); + if( mined || maxed ) { _w->showNormal(); } + + _de.setAttribute( "x", _w->x() ); + _de.setAttribute( "y", _w->y() ); _de.setAttribute( "width", _w->width() ); _de.setAttribute( "height", _w->height() ); + if( maxed ) { _w->showMaximized(); } + if( mined ) { _w->showMinimized(); } }