mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 03:07:53 -06:00
WIP: Only fetch variants if the machine has any
This commit is contained in:
parent
be211b7311
commit
76f431af76
2 changed files with 12 additions and 0 deletions
|
@ -2,6 +2,7 @@ from PyQt5.QtCore import Qt
|
|||
|
||||
from UM.Application import Application
|
||||
from UM.Qt.ListModel import ListModel
|
||||
from UM.Util import parseBool
|
||||
|
||||
from cura.Machines.VariantManager import VariantType
|
||||
|
||||
|
@ -30,6 +31,11 @@ class BuildPlateModel(ListModel):
|
|||
self.setItems([])
|
||||
return
|
||||
|
||||
has_variants = parseBool(global_stack.getMetaDataEntry("has_variant_buildplates", False))
|
||||
if not has_variants:
|
||||
self.setItems([])
|
||||
return
|
||||
|
||||
variant_dict = self._variant_manager.getVariantNodes(global_stack, variant_type = VariantType.BUILD_PLATE)
|
||||
|
||||
item_list = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue