mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-18 20:28:01 -06:00
Reduce indentation and complexity by using a pre-check
Contributes to issue CURA-7351.
This commit is contained in:
parent
cfc2cc3692
commit
d9649dc3dd
1 changed files with 29 additions and 28 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue