mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
Move comments for _fixMaterialDiameterAndNozzleSize()
This commit is contained in:
parent
6db26eaca5
commit
a09bf7faa6
1 changed files with 19 additions and 16 deletions
|
@ -404,16 +404,9 @@ class ExtruderManager(QObject):
|
|||
self.extrudersChanged.emit(global_stack_id)
|
||||
self.setActiveExtruderIndex(0)
|
||||
|
||||
def _fixMaterialDiameterAndNozzleSize(self, global_stack, extruder_stack_list):
|
||||
keys_to_copy = ["material_diameter", "machine_nozzle_size"] # these will be copied over to all extruders
|
||||
|
||||
extruder_positions_to_update = set()
|
||||
for extruder_stack in extruder_stack_list:
|
||||
for key in keys_to_copy:
|
||||
# Only copy the value when this extruder doesn't have the value.
|
||||
if extruder_stack.definitionChanges.hasProperty(key, "value"):
|
||||
continue
|
||||
|
||||
#
|
||||
# This function tries to fix the problem with per-extruder-settable nozzle size and material diameter problems
|
||||
# in early versions (3.0 - 3.2.1).
|
||||
#
|
||||
# We cannot add a setting definition of "material_diameter" into the extruder's definition at runtime
|
||||
# because all other machines which uses "fdmextruder" as the extruder definition will be affected.
|
||||
|
@ -430,6 +423,16 @@ class ExtruderManager(QObject):
|
|||
# machine definition and the extruder definition are the same, and if not, the default value in the machine
|
||||
# definition will be copied to the extruder stack's definition changes.
|
||||
#
|
||||
def _fixMaterialDiameterAndNozzleSize(self, global_stack, extruder_stack_list):
|
||||
keys_to_copy = ["material_diameter", "machine_nozzle_size"] # these will be copied over to all extruders
|
||||
|
||||
extruder_positions_to_update = set()
|
||||
for extruder_stack in extruder_stack_list:
|
||||
for key in keys_to_copy:
|
||||
# Only copy the value when this extruder doesn't have the value.
|
||||
if extruder_stack.definitionChanges.hasProperty(key, "value"):
|
||||
continue
|
||||
|
||||
setting_value_in_global_def_changes = global_stack.definitionChanges.getProperty(key, "value")
|
||||
setting_value_in_global_def = global_stack.definition.getProperty(key, "value")
|
||||
setting_value = setting_value_in_global_def
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue