Don't find any variants if the machine says it doesn't have them

Even if there might be a matching variant...

Contributes to issue CURA-6600.
This commit is contained in:
Ghostkeeper 2019-08-22 15:44:41 +02:00
parent 999e19940e
commit 0302ae4257
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276
3 changed files with 9 additions and 1 deletions

View file

@ -1,4 +1,4 @@
# Copyright (c) 2018 Ultimaker B.V.
# Copyright (c) 2019 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from PyQt5.QtCore import Qt
@ -7,6 +7,7 @@ from UM.Application import Application
from UM.Logger import Logger
from UM.Qt.ListModel import ListModel
from UM.Util import parseBool
from cura.Machines.ContainerTree import ContainerTree
from cura.Machines.VariantType import VariantType
@ -37,6 +38,8 @@ class NozzleModel(ListModel):
if global_stack is None:
self.setItems([])
return
machine_node = ContainerTree.getInstance().machines[global_stack.definition.getId()]
has_variants = parseBool(global_stack.getMetaDataEntry("has_variants", False))
if not has_variants: