mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 11:17:49 -06:00
Only variants of active machine are now shown
CURA-1278
This commit is contained in:
parent
b3e741e90c
commit
f3384b043d
2 changed files with 9 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue