From 7bbc91b7a5830aa9420b00e27290f832dc60849f Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 27 Oct 2021 16:11:02 +0200 Subject: [PATCH] Clear contents of net marketplace if window is closed CURA-8556 --- plugins/Marketplace/resources/qml/Marketplace.qml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/plugins/Marketplace/resources/qml/Marketplace.qml b/plugins/Marketplace/resources/qml/Marketplace.qml index 2b17d3ebf3..04c26b6936 100644 --- a/plugins/Marketplace/resources/qml/Marketplace.qml +++ b/plugins/Marketplace/resources/qml/Marketplace.qml @@ -18,6 +18,18 @@ Window width: minimumWidth height: minimumHeight + onVisibleChanged: + { + // Set and unset the content. No need to keep things in memory if it's not visible. + if(visible) + { + content.source = "plugins.qml" + } + else + { + content.source = "" + } + } title: "Marketplace" //Seen by Ultimaker as a brand name, so this doesn't get translated. modality: Qt.NonModal @@ -61,9 +73,9 @@ Window Loader //Page contents. { + id: content anchors.fill: parent anchors.margins: UM.Theme.getSize("default_margin").width - source: "Plugins.qml" } }