on xenial help sign in
cleanup
commit3c54c692da4f5e5c2802a607e7e4d2be1ad1803e authorMichael Zanetti <michael.zanetti@canonical.com> dateThu 15 Sep 2016, 12:48 (10 years ago) parent48dfea1
1 file changed+4−8
qml/Stage/Stage.qml+4−8
qml/Stage/Stage.qml+4−8
@@ -742,8 +742,11 @@ AbstractStage {
742742 decoratedWindow.surfaceOrientationAngle = 0;
743743 }
744744
745+ // First, cascade the newly created window, relative to the currently/old focused window.
745746 windowedX = priv.focusedAppDelegate ? priv.focusedAppDelegate.windowedX + units.gu(3) : (normalZ - 1) * units.gu(3)
746747 windowedY = priv.focusedAppDelegate ? priv.focusedAppDelegate.windowedY + units.gu(3) : normalZ * units.gu(3)
748+ // Now load any saved state. This needs to happen *after* the cascading!
749+ resizeArea.loadWindowState();
747750
748751 // NB: We're differentiating if this delegate was created in response to a new entry in the model
749752 // or if the Repeater is just populating itself with delegates to match the model it received.
@@ -1370,15 +1373,8 @@ AbstractStage {
13701373 appDelegate.focus = true;
13711374 }
13721375
1373− Component.onCompleted: {
1374− loadWindowState();
1375− }
1376−
1377− property bool saveStateOnDestruction: true
13781376 Component.onDestruction: {
1379− if (saveStateOnDestruction) {
1380− saveWindowState();
1381− }
1377+ saveWindowState();
13821378 }
13831379 }
13841380