on xenial help sign in
cleanup
3c54c69Michael Zanetti
qml/Stage/Stage.qml+4−8
@@ -742,8 +742,11 @@ AbstractStage {
742 decoratedWindow.surfaceOrientationAngle = 0;
742 decoratedWindow.surfaceOrientationAngle = 0;
743 }
743 }
744
744
745+ // First, cascade the newly created window, relative to the currently/old focused window.
745 windowedX = priv.focusedAppDelegate ? priv.focusedAppDelegate.windowedX + units.gu(3) : (normalZ - 1) * units.gu(3)
746 windowedX = priv.focusedAppDelegate ? priv.focusedAppDelegate.windowedX + units.gu(3) : (normalZ - 1) * units.gu(3)
746 windowedY = priv.focusedAppDelegate ? priv.focusedAppDelegate.windowedY + units.gu(3) : normalZ * units.gu(3)
747 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();
747
750
748 // NB: We're differentiating if this delegate was created in response to a new entry in the model
751 // NB: We're differentiating if this delegate was created in response to a new entry in the model
749 // or if the Repeater is just populating itself with delegates to match the model it received.
752 // or if the Repeater is just populating itself with delegates to match the model it received.
@@ -1370,15 +1373,8 @@ AbstractStage {
1370 appDelegate.focus = true;
1373 appDelegate.focus = true;
1371 }
1374 }
1372
1375
1373− Component.onCompleted: {
1374− loadWindowState();
1375− }
1376−
1377− property bool saveStateOnDestruction: true
1378 Component.onDestruction: {
1376 Component.onDestruction: {
1379− if (saveStateOnDestruction) {
1380− saveWindowState();
1377+ saveWindowState();
1381− }
1382 }
1378 }
1383 }
1379 }
1384
1380