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:
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;