mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 21:45:51 +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)
|
@pyqtSlot(str)
|
||||||
def removeMachine(self, machine_id):
|
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)
|
UM.Settings.ContainerRegistry.getInstance().removeContainer(machine_id)
|
||||||
|
|
||||||
@pyqtProperty(bool, notify = globalContainerChanged)
|
@pyqtProperty(bool, notify = globalContainerChanged)
|
||||||
|
@ -112,7 +112,7 @@
|
|||||||
"unit": "mm",
|
"unit": "mm",
|
||||||
"default_value": 0,
|
"default_value": 0,
|
||||||
"global_only": "True"
|
"global_only": "True"
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,9 +22,11 @@ UM.ManagementPage
|
|||||||
onAddObject: Printer.requestAddPrinter()
|
onAddObject: Printer.requestAddPrinter()
|
||||||
onRemoveObject: confirmDialog.open();
|
onRemoveObject: confirmDialog.open();
|
||||||
onRenameObject: renameDialog.open();
|
onRenameObject: renameDialog.open();
|
||||||
|
onActivateObject: Cura.MachineManager.setActiveMachine(base.currentItem.id)
|
||||||
|
|
||||||
removeEnabled: numInstances > 1
|
removeEnabled: base.currentItem != null && numInstances > 1
|
||||||
renameEnabled: numInstances > 0
|
renameEnabled: base.currentItem != null && numInstances > 0
|
||||||
|
activateEnabled: base.currentItem != null
|
||||||
|
|
||||||
Flow
|
Flow
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user