diff --git a/src/slic3r/GUI/DoubleSlider.cpp b/src/slic3r/GUI/DoubleSlider.cpp index c12d361120c..81945061b06 100644 --- a/src/slic3r/GUI/DoubleSlider.cpp +++ b/src/slic3r/GUI/DoubleSlider.cpp @@ -1317,7 +1317,12 @@ wxString Control::get_tooltip(int tick/*=-1*/) "This code won't be processed during G-code generation."); // Show custom Gcode as a first string of tooltop - tooltip = " "; + std::string space = " "; + tooltip = space; + auto format_gcode = [space](std::string gcode) { + boost::replace_all(gcode, "\n", "\n" + space); + return gcode; + }; tooltip += tick_code_it->type == ColorChange ? (m_mode == SingleExtruder ? @@ -1329,7 +1334,7 @@ wxString Control::get_tooltip(int tick/*=-1*/) format_wxstr(_L("Custom template (\"%1%\")"), gcode(Template)) : tick_code_it->type == ToolChange ? format_wxstr(_L("Extruder (tool) is changed to Extruder \"%1%\""), tick_code_it->extruder) : - from_u8(tick_code_it->extra);// tick_code_it->type == Custom + from_u8(format_gcode(tick_code_it->extra));// tick_code_it->type == Custom // If tick is marked as a conflict (exclamation icon), // we should to explain why