on xenial help sign in
only store when destroying the scene
63ca913Michael Zanetti
qml/Stages/WindowMoveResizeArea.qml+1−1
@@ -108,7 +108,7 @@ MouseArea {
108 }
108 }
109 }
109 }
110
110
111− onReleased: {
111+ Component.onDestruction: {
112 WindowStateStorage.saveGeometry(root.windowId, Qt.rect(target.x, target.y, target.width, target.height))
112 WindowStateStorage.saveGeometry(root.windowId, Qt.rect(target.x, target.y, target.width, target.height))
113 }
113 }
114}
114}
tests/qmltests/Stages/tst_WindowMoveResizeArea.qml+2
@@ -177,6 +177,7 @@ Item {
177
177
178 // This will destroy the window and recreate it
178 // This will destroy the window and recreate it
179 windowLoader.active = false;
179 windowLoader.active = false;
180+ waitForRendering(root);
180 windowLoader.active = true;
181 windowLoader.active = true;
181
182
182 // Make sure it's again where we left it before destroying
183 // Make sure it's again where we left it before destroying
@@ -200,6 +201,7 @@ Item {
200
201
201 // This will destroy the window and recreate it
202 // This will destroy the window and recreate it
202 windowLoader.active = false;
203 windowLoader.active = false;
204+ waitForRendering(root);
203 windowLoader.active = true;
205 windowLoader.active = true;
204
206
205 // Make sure its size is again the same as before
207 // Make sure its size is again the same as before