diff --git a/src/slic3r/GUI/DoubleSlider.cpp b/src/slic3r/GUI/DoubleSlider.cpp index 94d6a2c647..36a4f6e5cf 100644 --- a/src/slic3r/GUI/DoubleSlider.cpp +++ b/src/slic3r/GUI/DoubleSlider.cpp @@ -384,6 +384,10 @@ void Control::SetTicksValues(const Info& custom_gcode_per_print_z) // Switch to the "Feature type"/"Tool" from the very beginning of a new object slicing after deleting of the old one post_ticks_changed_event(); + // init extruder sequence in respect to the extruders count + if (m_ticks.empty()) + m_extruders_sequence.init(m_extruder_colors.size()); + if (custom_gcode_per_print_z.mode && !custom_gcode_per_print_z.gcodes.empty()) m_ticks.mode = custom_gcode_per_print_z.mode; diff --git a/src/slic3r/GUI/DoubleSlider.hpp b/src/slic3r/GUI/DoubleSlider.hpp index 601cbc7088..0f663f6630 100644 --- a/src/slic3r/GUI/DoubleSlider.hpp +++ b/src/slic3r/GUI/DoubleSlider.hpp @@ -180,6 +180,13 @@ struct ExtrudersSequence return;// last item can't be deleted extruders.erase(extruders.begin() + pos); } + + void init(size_t extruders_count) + { + extruders.clear(); + for (size_t extruder = 0; extruder < extruders_count; extruder++) + extruders.push_back(extruder); + } }; class Control : public wxControl