mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 05:45:55 +08:00
Reduce indentation and complexity by using a pre-check
Contributes to issue CURA-7351.
This commit is contained in:
parent
cfc2cc3692
commit
d9649dc3dd
@ -38,7 +38,8 @@ class RetractContinue(Script):
|
||||
current_x = self.getValue(line, "X", current_x)
|
||||
current_y = self.getValue(line, "Y", current_y)
|
||||
if self.getValue(line, "G") == 1:
|
||||
if self.getValue(line, "E"):
|
||||
if not self.getValue(line, "E"): # Either None or 0: Not a retraction then.
|
||||
continue
|
||||
new_e = self.getValue(line, "E")
|
||||
if new_e >= current_e: # Not a retraction.
|
||||
continue
|
||||
|
Loading…
x
Reference in New Issue
Block a user