- cleanup (parent) signals InteractiveWindow after window is closed

This commit is contained in:
Thijs Wenker 2018-07-06 20:24:43 +02:00
parent eea95161ab
commit 4b2e0765db

View file

@ -120,12 +120,8 @@ Windows.Window {
Component.onCompleted: {
// Fix for parent loss on OSX:
parent.heightChanged.connect(function() {
updateContentParent();
});
parent.widthChanged.connect(function() {
updateContentParent();
});
parent.heightChanged.connect(updateContentParent);
parent.widthChanged.connect(updateContentParent);
x = interactiveWindowPosition.x;
y = interactiveWindowPosition.y;
@ -194,6 +190,11 @@ Windows.Window {
initialized = true;
}
Component.onDestruction: {
parent.heightChanged.disconnect(updateContentParent);
parent.widthChanged.disconnect(updateContentParent);
}
// Handle message traffic from the script that launched us to the loaded QML
function fromScript(message) {
if (root.dynamicContent && root.dynamicContent.fromScript) {