mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 21:57:00 +02:00
- cleanup (parent) signals InteractiveWindow after window is closed
This commit is contained in:
parent
eea95161ab
commit
4b2e0765db
1 changed files with 7 additions and 6 deletions
|
@ -120,12 +120,8 @@ Windows.Window {
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
// Fix for parent loss on OSX:
|
// Fix for parent loss on OSX:
|
||||||
parent.heightChanged.connect(function() {
|
parent.heightChanged.connect(updateContentParent);
|
||||||
updateContentParent();
|
parent.widthChanged.connect(updateContentParent);
|
||||||
});
|
|
||||||
parent.widthChanged.connect(function() {
|
|
||||||
updateContentParent();
|
|
||||||
});
|
|
||||||
|
|
||||||
x = interactiveWindowPosition.x;
|
x = interactiveWindowPosition.x;
|
||||||
y = interactiveWindowPosition.y;
|
y = interactiveWindowPosition.y;
|
||||||
|
@ -194,6 +190,11 @@ Windows.Window {
|
||||||
initialized = true;
|
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
|
// Handle message traffic from the script that launched us to the loaded QML
|
||||||
function fromScript(message) {
|
function fromScript(message) {
|
||||||
if (root.dynamicContent && root.dynamicContent.fromScript) {
|
if (root.dynamicContent && root.dynamicContent.fromScript) {
|
||||||
|
|
Loading…
Reference in a new issue