From b20e5bfd989d579853e5f29c0d703bc9beed0a26 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 6 Sep 2019 12:42:15 +0200 Subject: [PATCH] Don't display any message if setting is empty Contributes to issue CURA-6759. --- plugins/PostProcessingPlugin/scripts/PauseAtHeight.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index cc83b7b76c..913be4e966 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -114,9 +114,9 @@ class PauseAtHeight(Script): "display_text": { "label": "Display Text", - "description": "Text that should appear on the display while paused.", + "description": "Text that should appear on the display while paused. If left empty, there will not be any message.", "type": "str", - "default_value": "Print paused." + "default_value": "" } } }""" @@ -295,7 +295,8 @@ class PauseAtHeight(Script): # Set extruder standby temperature prepend_gcode += self.putValue(M = 104, S = standby_temperature) + " ; standby temperature\n" - prepend_gcode += "M117 " + display_text + "\n" + if display_text: + prepend_gcode += "M117 " + display_text + "\n" # Wait till the user continues printing prepend_gcode += self.putValue(M = 0) + " ; Do the actual pause\n"