Merge pull request #7919 from adripo/patch-2

Fixed next XY return position after pause
This commit is contained in:
Nino van Hooff 2020-06-18 11:27:32 +02:00 committed by GitHub
commit c810ae97a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -204,6 +204,7 @@ class PauseAtHeight(Script):
"""Get the X and Y values for a layer (will be used to get X and Y of the layer after the pause).""" """Get the X and Y values for a layer (will be used to get X and Y of the layer after the pause)."""
lines = layer.split("\n") lines = layer.split("\n")
for line in lines: for line in lines:
if line.startswith(("G0", "G1", "G2", "G3")):
if self.getValue(line, "X") is not None and self.getValue(line, "Y") is not None: if self.getValue(line, "X") is not None and self.getValue(line, "Y") is not None:
x = self.getValue(line, "X") x = self.getValue(line, "X")
y = self.getValue(line, "Y") y = self.getValue(line, "Y")