Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsupermerill <merill@free.fr>2021-12-11 23:41:40 +0300
committersupermerill <merill@free.fr>2021-12-11 23:41:55 +0300
commitb1e044855e1f38a5b177ce9b58d3d09cef89c3f1 (patch)
treedca3589be0a1f6cb62ed09b61c3370844467db75 /src
parent5a5ea52a6ed6f6a4530c4514b33eb6fe43ac8021 (diff)
Don't consider ' ' or '\n' for custom toolchange gcode detection
supermerill/SuperSlicer#1368
Diffstat (limited to 'src')
-rw-r--r--src/libslic3r/GCode.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp
index b4f546bf7..cd4a79af0 100644
--- a/src/libslic3r/GCode.cpp
+++ b/src/libslic3r/GCode.cpp
@@ -4401,7 +4401,8 @@ std::string GCode::toolchange(uint16_t extruder_id, double print_z) {
std::string gcode;
// Process the custom toolchange_gcode. If it is empty, insert just a Tn command.
- const std::string& toolchange_gcode = m_config.toolchange_gcode.value;
+ std::string toolchange_gcode = m_config.toolchange_gcode.value;
+ boost::trim(toolchange_gcode); //remove invisible characters that may compromize the 'toolchange_gcode.empty()'
std::string toolchange_gcode_parsed;
if (!toolchange_gcode.empty() && m_writer.multiple_extruders) {
DynamicConfig config;