Merge pull request #1490 from curlymorphic/i1408

Proposed fix for #1408 Window Size in windowed and full screen modes.
This commit is contained in:
Tres Finocchiaro
2014-12-23 08:31:21 -05:00

View File

@@ -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(); }
}