From 64a613f407ad4065d5c30a96dbad82eae59c63d9 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Fri, 27 May 2016 11:47:50 +0200 Subject: [PATCH 1/3] Fix "Activate" button on the Manage Printers page CURA-1278 --- resources/qml/MachinesPage.qml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/qml/MachinesPage.qml b/resources/qml/MachinesPage.qml index 14425acc05..8c7a2c521d 100644 --- a/resources/qml/MachinesPage.qml +++ b/resources/qml/MachinesPage.qml @@ -22,9 +22,11 @@ UM.ManagementPage onAddObject: Printer.requestAddPrinter() onRemoveObject: confirmDialog.open(); onRenameObject: renameDialog.open(); + onActivateObject: Cura.MachineManager.setActiveMachine(base.currentItem.id) - removeEnabled: numInstances > 1 - renameEnabled: numInstances > 0 + removeEnabled: base.currentItem != null && numInstances > 1 + renameEnabled: base.currentItem != null && numInstances > 0 + activateEnabled: base.currentItem != null Flow { From 63556318425f595129aaee1aa8b6e98f1c9d1e39 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Fri, 27 May 2016 11:53:53 +0200 Subject: [PATCH 2/3] Activate another machine when we remove the currently active MachineManagerModel CURA-1278 --- cura/MachineManagerModel.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index 11cb55d2b4..7b42483fca 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -266,6 +266,11 @@ class MachineManagerModel(QObject): @pyqtSlot(str) def removeMachine(self, machine_id): + # If the machine that is being removed is the currently active machine, set another machine as the active machine + if self._global_container_stack and self._global_container_stack.getId() == machine_id: + containers = UM.Settings.ContainerRegistry.getInstance().findContainerStacks() + if containers: + Application.getInstance().setGlobalContainerStack(containers[0]) UM.Settings.ContainerRegistry.getInstance().removeContainer(machine_id) @pyqtProperty(bool, notify = globalContainerChanged) From aa2d09aa0863b42284b001bbe99171ae26bbc2a0 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Fri, 27 May 2016 12:44:49 +0200 Subject: [PATCH 3/3] JSON lil fix: superflious comma (CURA-1616) --- resources/definitions/fdmextruder.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/fdmextruder.def.json b/resources/definitions/fdmextruder.def.json index 6533d211c5..e9be929e72 100644 --- a/resources/definitions/fdmextruder.def.json +++ b/resources/definitions/fdmextruder.def.json @@ -112,7 +112,7 @@ "unit": "mm", "default_value": 0, "global_only": "True" - }, + } } } }