mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-10 00:07:51 -06:00
Multiple fixes for stacks
CURA-4617
This commit is contained in:
parent
7bb82cf56f
commit
c7667b56e2
2 changed files with 5 additions and 7 deletions
|
@ -454,16 +454,14 @@ class CuraContainerRegistry(ContainerRegistry):
|
|||
|
||||
material_id = "default"
|
||||
if machine.material.getId() not in ("empty", "empty_material"):
|
||||
# TODO: find the ID that's suitable for this extruder
|
||||
pass
|
||||
material_id = machine.material.getId()
|
||||
else:
|
||||
material_id = "empty_material"
|
||||
extruder_stack.setMaterialById(material_id)
|
||||
|
||||
quality_id = "default"
|
||||
if machine.quality.getId() not in ("empty", "empty_quality"):
|
||||
# TODO: find the ID that's suitable for this extruder
|
||||
pass
|
||||
quality_id = machine.quality.getId()
|
||||
else:
|
||||
quality_id = "empty_quality"
|
||||
extruder_stack.setQualityById(quality_id)
|
||||
|
|
|
@ -121,7 +121,7 @@ class CuraContainerStack(ContainerStack):
|
|||
#
|
||||
# \throws Exceptions.InvalidContainerError Raised when no container could be found with the specified ID.
|
||||
def setQualityById(self, new_quality_id: str) -> None:
|
||||
quality = self._empty_instance_container
|
||||
quality = self._empty_quality
|
||||
if new_quality_id == "default":
|
||||
new_quality = self.findDefaultQuality()
|
||||
if new_quality:
|
||||
|
@ -159,7 +159,7 @@ class CuraContainerStack(ContainerStack):
|
|||
#
|
||||
# \throws Exceptions.InvalidContainerError Raised when no container could be found with the specified ID.
|
||||
def setMaterialById(self, new_material_id: str) -> None:
|
||||
material = self._empty_instance_container
|
||||
material = self._empty_material
|
||||
if new_material_id == "default":
|
||||
new_material = self.findDefaultMaterial()
|
||||
if new_material:
|
||||
|
@ -197,7 +197,7 @@ class CuraContainerStack(ContainerStack):
|
|||
#
|
||||
# \throws Exceptions.InvalidContainerError Raised when no container could be found with the specified ID.
|
||||
def setVariantById(self, new_variant_id: str) -> None:
|
||||
variant = self._empty_instance_container
|
||||
variant = self._empty_variant
|
||||
if new_variant_id == "default":
|
||||
new_variant = self.findDefaultVariant()
|
||||
if new_variant:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue