Merge branch 'master' of github.com:Ultimaker/Cura

This commit is contained in:
Jaime van Kessel 2016-05-27 14:01:06 +02:00
commit d5dbd0f77b
3 changed files with 10 additions and 3 deletions

View File

@ -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)

View File

@ -112,7 +112,7 @@
"unit": "mm",
"default_value": 0,
"global_only": "True"
},
}
}
}
}

View File

@ -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
{