From af77eca9df45ca65529b885cce062caa1d754eb0 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Wed, 11 Sep 2019 10:02:27 +0200 Subject: [PATCH] Follow-up of 44c3493f7dbfe0538d27a5ce3501c0455e4aa1c1 -> error message logged only for multi-extruder printers --- src/libslic3r/GCode/Analyzer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libslic3r/GCode/Analyzer.cpp b/src/libslic3r/GCode/Analyzer.cpp index 5250c90b0b..20f0483b0e 100644 --- a/src/libslic3r/GCode/Analyzer.cpp +++ b/src/libslic3r/GCode/Analyzer.cpp @@ -529,7 +529,10 @@ void GCodeAnalyzer::_processT(const std::string& cmd) if (_get_extruder_id() != id) { if (id >= m_extruders_count) - BOOST_LOG_TRIVIAL(error) << "GCodeAnalyzer encountered an invalid toolchange, maybe from a custom gcode."; + { + if (m_extruders_count > 1) + BOOST_LOG_TRIVIAL(error) << "GCodeAnalyzer encountered an invalid toolchange, maybe from a custom gcode."; + } else _set_extruder_id(id);