mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 00:55:51 +08:00
Only variants of active machine are now shown
CURA-1278
This commit is contained in:
parent
b3e741e90c
commit
f3384b043d
@ -105,6 +105,10 @@ class MachineManagerModel(QObject):
|
||||
if containers:
|
||||
containers[0].setName(new_name)
|
||||
|
||||
@pyqtProperty(str, notify=globalContainerChanged)
|
||||
def activeMachineDefinitionId(self):
|
||||
return Application.getInstance().getGlobalContainerStack().getContainers()[-1].getId()
|
||||
|
||||
@pyqtSlot(str)
|
||||
def removeMachine(self, machine_id):
|
||||
ContainerRegistry.getInstance().removeContainer(machine_id)
|
||||
|
@ -145,9 +145,12 @@ Item
|
||||
id: variantSelectionInstantiator
|
||||
model: UM.InstanceContainersModel
|
||||
{
|
||||
filter: {"type": "variant"}
|
||||
filter:
|
||||
{
|
||||
"type": "variant",
|
||||
"definition": Cura.MachineManager.activeMachineDefinitionId //Only show variants of this machine
|
||||
}
|
||||
}
|
||||
// model: UM.MachineVariantsModel { id: variantsModel }
|
||||
MenuItem
|
||||
{
|
||||
text: model.name;
|
||||
|
Loading…
x
Reference in New Issue
Block a user