mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 19:35:58 +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:
|
if containers:
|
||||||
containers[0].setName(new_name)
|
containers[0].setName(new_name)
|
||||||
|
|
||||||
|
@pyqtProperty(str, notify=globalContainerChanged)
|
||||||
|
def activeMachineDefinitionId(self):
|
||||||
|
return Application.getInstance().getGlobalContainerStack().getContainers()[-1].getId()
|
||||||
|
|
||||||
@pyqtSlot(str)
|
@pyqtSlot(str)
|
||||||
def removeMachine(self, machine_id):
|
def removeMachine(self, machine_id):
|
||||||
ContainerRegistry.getInstance().removeContainer(machine_id)
|
ContainerRegistry.getInstance().removeContainer(machine_id)
|
||||||
|
@ -145,9 +145,12 @@ Item
|
|||||||
id: variantSelectionInstantiator
|
id: variantSelectionInstantiator
|
||||||
model: UM.InstanceContainersModel
|
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
|
MenuItem
|
||||||
{
|
{
|
||||||
text: model.name;
|
text: model.name;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user