mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Simplify if/else statement
This deduplicates some code and makes it generally easier to read. Contributes to issue CURA-8219.
This commit is contained in:
parent
e1e25d629e
commit
bed255ecb9
1 changed files with 2 additions and 4 deletions
|
@ -91,9 +91,7 @@ class FilamentChange(Script):
|
|||
|
||||
color_change = "M600"
|
||||
|
||||
if firmware_config:
|
||||
color_change = color_change + " ; Generated by FilamentChange plugin\n"
|
||||
else:
|
||||
if not firmware_config:
|
||||
if initial_retract is not None and initial_retract > 0.:
|
||||
color_change = color_change + (" E%.2f" % initial_retract)
|
||||
|
||||
|
@ -106,7 +104,7 @@ class FilamentChange(Script):
|
|||
if y_pos is not None:
|
||||
color_change = color_change + (" Y%.2f" % y_pos)
|
||||
|
||||
color_change = color_change + " ; Generated by FilamentChange plugin\n"
|
||||
color_change = color_change + " ; Generated by FilamentChange plugin\n"
|
||||
|
||||
layer_targets = layer_nums.split(",")
|
||||
if len(layer_targets) > 0:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue