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:
Ghostkeeper 2021-05-05 14:50:43 +02:00
parent e1e25d629e
commit bed255ecb9
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A

View file

@ -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)