diff options
author | Nino van Hooff <ninovanhooff@gmail.com> | 2020-06-18 12:27:32 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-18 12:27:32 +0300 |
commit | c810ae97a7b33a97dcdda658c4ad5b584df97278 (patch) | |
tree | fbedcfb16bbae278ee91667064d0b0e87e83bdc0 /plugins/PostProcessingPlugin | |
parent | 466ec7c42a1241805924ec5a167d023e0e678273 (diff) | |
parent | 2fc06069baf87d396a0d850085002cf26c6d56c9 (diff) |
Merge pull request #7919 from adripo/patch-2
Fixed next XY return position after pause
Diffstat (limited to 'plugins/PostProcessingPlugin')
-rw-r--r-- | plugins/PostProcessingPlugin/scripts/PauseAtHeight.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index 114ab4d34a..aa879ef889 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -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]: |