From 1945ed43be64af9abb6ccee659cc1447594bec14 Mon Sep 17 00:00:00 2001 From: Dave French Date: Tue, 23 Dec 2014 12:57:19 +0000 Subject: [PATCH] Proposed fox for 1408 Window size in window and full-screen modes --- src/gui/MainWindow.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index fa051e69f..8e9743adc 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -636,14 +636,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(); } }