From 1207533046916035f192dc82e5999b14f62e4e30 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Wed, 3 Apr 2019 15:11:52 +0200 Subject: [PATCH 1/3] Fix local printer selection update CURA-6057 --- cura/Machines/Models/FirstStartMachineActionsModel.py | 1 + resources/qml/WelcomePages/AddLocalPrinterScrollView.qml | 1 + 2 files changed, 2 insertions(+) diff --git a/cura/Machines/Models/FirstStartMachineActionsModel.py b/cura/Machines/Models/FirstStartMachineActionsModel.py index 489509f4ec..aad5372cde 100644 --- a/cura/Machines/Models/FirstStartMachineActionsModel.py +++ b/cura/Machines/Models/FirstStartMachineActionsModel.py @@ -95,6 +95,7 @@ class FirstStartMachineActionsModel(ListModel): "content": item.displayItem, "action": item, }) + item.reset() self.setItems(item_list) self.reset() diff --git a/resources/qml/WelcomePages/AddLocalPrinterScrollView.qml b/resources/qml/WelcomePages/AddLocalPrinterScrollView.qml index 6fa50c69a1..ff64cdc33e 100644 --- a/resources/qml/WelcomePages/AddLocalPrinterScrollView.qml +++ b/resources/qml/WelcomePages/AddLocalPrinterScrollView.qml @@ -147,6 +147,7 @@ ScrollView } text: name visible: base.currentSection == section + onClicked: ListView.view.currentIndex = index } } } From 2ccc30b8246312b86b855dc42fd90deb0bcc9e89 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 3 Apr 2019 15:52:07 +0200 Subject: [PATCH 2/3] Only show add machine dialogue if your stack got corrupt, not whole onboarding We don't need to accept the EULA again or whatever. Just add the printer that got lost. Contributes to issue CURA-6057. --- resources/qml/Cura.qml | 6 +++++- resources/qml/Dialogs/AddMachineDialog.qml | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 6272157ec4..47f5449baf 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -84,7 +84,7 @@ UM.MainWindow Cura.Actions.parent = backgroundItem CuraApplication.purgeWindows() - if (CuraApplication.needToShowUserAgreement || Cura.MachineManager.activeMachine == null) + if (CuraApplication.needToShowUserAgreement) { welcomeDialog.visible = true } @@ -851,6 +851,10 @@ UM.MainWindow { base.visible = true; } + if(Cura.MachineManager.activeMachine == null) + { + addMachineDialog.open(); + } } } diff --git a/resources/qml/Dialogs/AddMachineDialog.qml b/resources/qml/Dialogs/AddMachineDialog.qml index dafe12693f..d3988155b7 100644 --- a/resources/qml/Dialogs/AddMachineDialog.qml +++ b/resources/qml/Dialogs/AddMachineDialog.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Ultimaker B.V. +// Copyright (c) 2019 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 @@ -38,7 +38,8 @@ UM.Dialog onVisibilityChanged: { // Reset selection and machine name - if (visible) { + if (visible) + { activeCategory = preferredCategory; machineList.currentIndex = 0; machineName.text = getMachineName(); From b9efeb47ed764e8cd76f6077cb733ae5ae6a85dc Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 3 Apr 2019 15:56:54 +0200 Subject: [PATCH 3/3] Don't open add printer wizard on first launch Oops. Contributes to issue CURA-6057. --- resources/qml/Cura.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 47f5449baf..dd985fe5c3 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -851,7 +851,7 @@ UM.MainWindow { base.visible = true; } - if(Cura.MachineManager.activeMachine == null) + if(!CuraApplication.needToShowUserAgreement && Cura.MachineManager.activeMachine == null) { addMachineDialog.open(); }