mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 21:44:01 -06:00
Close new marketplace window when signing out or in
Because otherwise you can either see plugins you might not have the rights to, or not see plugins you do have the rights to. part of CURA-8556
This commit is contained in:
parent
7bbc91b7a5
commit
e3d90f16a1
1 changed files with 9 additions and 8 deletions
|
@ -7,6 +7,7 @@ import QtQuick.Layouts 1.15
|
|||
import QtQuick.Window 2.2
|
||||
|
||||
import UM 1.2 as UM
|
||||
import Cura 1.6 as Cura
|
||||
|
||||
Window
|
||||
{
|
||||
|
@ -18,18 +19,18 @@ Window
|
|||
width: minimumWidth
|
||||
height: minimumHeight
|
||||
|
||||
onVisibleChanged:
|
||||
// Set and unset the content. No need to keep things in memory if it's not visible.
|
||||
onVisibleChanged: content.source = visible ? "Plugins.qml" : ""
|
||||
|
||||
Connections
|
||||
{
|
||||
// Set and unset the content. No need to keep things in memory if it's not visible.
|
||||
if(visible)
|
||||
target: Cura.API.account
|
||||
function onLoginStateChanged()
|
||||
{
|
||||
content.source = "plugins.qml"
|
||||
}
|
||||
else
|
||||
{
|
||||
content.source = ""
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
||||
title: "Marketplace" //Seen by Ultimaker as a brand name, so this doesn't get translated.
|
||||
modality: Qt.NonModal
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue