mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-21 13:19:37 +08:00
Merge pull request #7919 from adripo/patch-2
Fixed next XY return position after pause
This commit is contained in:
commit
c810ae97a7
@ -204,10 +204,11 @@ 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)."""
|
||||
lines = layer.split("\n")
|
||||
for line in lines:
|
||||
if self.getValue(line, "X") is not None and self.getValue(line, "Y") is not None:
|
||||
x = self.getValue(line, "X")
|
||||
y = self.getValue(line, "Y")
|
||||
return x, y
|
||||
if line.startswith(("G0", "G1", "G2", "G3")):
|
||||
if self.getValue(line, "X") is not None and self.getValue(line, "Y") is not None:
|
||||
x = self.getValue(line, "X")
|
||||
y = self.getValue(line, "Y")
|
||||
return x, y
|
||||
return 0, 0
|
||||
|
||||
def execute(self, data: List[str]) -> List[str]:
|
||||
|
Loading…
x
Reference in New Issue
Block a user