mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-20 13:17:51 -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_x = self.getValue(line, "X", current_x)
|
||||||
current_y = self.getValue(line, "Y", current_y)
|
current_y = self.getValue(line, "Y", current_y)
|
||||||
if self.getValue(line, "G") == 1:
|
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")
|
new_e = self.getValue(line, "E")
|
||||||
if new_e >= current_e: # Not a retraction.
|
if new_e >= current_e: # Not a retraction.
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue