mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 06:15:54 +08:00
Merge branch 'master' of github.com:Ultimaker/Cura
This commit is contained in:
commit
d5dbd0f77b
@ -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)
|
||||
|
@ -112,7 +112,7 @@
|
||||
"unit": "mm",
|
||||
"default_value": 0,
|
||||
"global_only": "True"
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user