mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
CURA-5327 renamed MachineManager._updateMaterialWithVariant to updateMaterialWithVariant
This commit is contained in:
parent
2eedc96f36
commit
b3f6e5c9e0
2 changed files with 7 additions and 7 deletions
|
@ -309,7 +309,7 @@ class MachineManager(QObject):
|
||||||
|
|
||||||
# Update materials to make sure that the diameters match with the machine's
|
# Update materials to make sure that the diameters match with the machine's
|
||||||
for position in global_stack.extruders:
|
for position in global_stack.extruders:
|
||||||
self._updateMaterialWithVariant(position)
|
self.updateMaterialWithVariant(position)
|
||||||
|
|
||||||
global_quality = global_stack.quality
|
global_quality = global_stack.quality
|
||||||
quality_type = global_quality.getMetaDataEntry("quality_type")
|
quality_type = global_quality.getMetaDataEntry("quality_type")
|
||||||
|
@ -1205,7 +1205,7 @@ class MachineManager(QObject):
|
||||||
current_quality_type, quality_type)
|
current_quality_type, quality_type)
|
||||||
self._setQualityGroup(candidate_quality_groups[quality_type], empty_quality_changes = True)
|
self._setQualityGroup(candidate_quality_groups[quality_type], empty_quality_changes = True)
|
||||||
|
|
||||||
def _updateMaterialWithVariant(self, position: Optional[str]):
|
def updateMaterialWithVariant(self, position: Optional[str]):
|
||||||
if self._global_container_stack is None:
|
if self._global_container_stack is None:
|
||||||
return
|
return
|
||||||
if position is None:
|
if position is None:
|
||||||
|
@ -1291,7 +1291,7 @@ class MachineManager(QObject):
|
||||||
self._setMaterial(position, material_container_node)
|
self._setMaterial(position, material_container_node)
|
||||||
else:
|
else:
|
||||||
self._global_container_stack.extruders[position].material = self._empty_material_container
|
self._global_container_stack.extruders[position].material = self._empty_material_container
|
||||||
self._updateMaterialWithVariant(position)
|
self.updateMaterialWithVariant(position)
|
||||||
|
|
||||||
if configuration.buildplateConfiguration is not None:
|
if configuration.buildplateConfiguration is not None:
|
||||||
global_variant_container_node = self._variant_manager.getBuildplateVariantNode(self._global_container_stack.definition.getId(), configuration.buildplateConfiguration)
|
global_variant_container_node = self._variant_manager.getBuildplateVariantNode(self._global_container_stack.definition.getId(), configuration.buildplateConfiguration)
|
||||||
|
@ -1337,7 +1337,7 @@ class MachineManager(QObject):
|
||||||
self.blurSettings.emit()
|
self.blurSettings.emit()
|
||||||
with postponeSignals(*self._getContainerChangedSignals(), compress = CompressTechnique.CompressPerParameterValue):
|
with postponeSignals(*self._getContainerChangedSignals(), compress = CompressTechnique.CompressPerParameterValue):
|
||||||
self._setGlobalVariant(container_node)
|
self._setGlobalVariant(container_node)
|
||||||
self._updateMaterialWithVariant(None) # Update all materials
|
self.updateMaterialWithVariant(None) # Update all materials
|
||||||
self._updateQualityWithMaterial()
|
self._updateQualityWithMaterial()
|
||||||
|
|
||||||
@pyqtSlot(str, str)
|
@pyqtSlot(str, str)
|
||||||
|
@ -1374,7 +1374,7 @@ class MachineManager(QObject):
|
||||||
self.blurSettings.emit()
|
self.blurSettings.emit()
|
||||||
with postponeSignals(*self._getContainerChangedSignals(), compress = CompressTechnique.CompressPerParameterValue):
|
with postponeSignals(*self._getContainerChangedSignals(), compress = CompressTechnique.CompressPerParameterValue):
|
||||||
self._setVariantNode(position, container_node)
|
self._setVariantNode(position, container_node)
|
||||||
self._updateMaterialWithVariant(position)
|
self.updateMaterialWithVariant(position)
|
||||||
self._updateQualityWithMaterial()
|
self._updateQualityWithMaterial()
|
||||||
|
|
||||||
# See if we need to show the Discard or Keep changes screen
|
# See if we need to show the Discard or Keep changes screen
|
||||||
|
@ -1438,5 +1438,5 @@ class MachineManager(QObject):
|
||||||
if self._global_container_stack is None:
|
if self._global_container_stack is None:
|
||||||
return
|
return
|
||||||
with postponeSignals(*self._getContainerChangedSignals(), compress = CompressTechnique.CompressPerParameterValue):
|
with postponeSignals(*self._getContainerChangedSignals(), compress = CompressTechnique.CompressPerParameterValue):
|
||||||
self._updateMaterialWithVariant(None)
|
self.updateMaterialWithVariant(None)
|
||||||
self._updateQualityWithMaterial()
|
self._updateQualityWithMaterial()
|
||||||
|
|
|
@ -158,4 +158,4 @@ class MachineSettingsAction(MachineAction):
|
||||||
@pyqtSlot(int)
|
@pyqtSlot(int)
|
||||||
def updateMaterialForDiameter(self, extruder_position: int):
|
def updateMaterialForDiameter(self, extruder_position: int):
|
||||||
# Updates the material container to a material that matches the material diameter set for the printer
|
# Updates the material container to a material that matches the material diameter set for the printer
|
||||||
self._application.getMachineManager()._updateMaterialWithVariant(extruder_position)
|
self._application.getMachineManager().updateMaterialWithVariant(extruder_position)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue