From 129134f6df3fbad88d3b83a901b665da5c66f5c3 Mon Sep 17 00:00:00 2001 From: "xun.zhang" Date: Tue, 18 Feb 2025 11:36:10 +0800 Subject: [PATCH] ENH: initialize nozzle num in gcodeviewer jira:none Signed-off-by: xun.zhang Change-Id: I44827eb7adb457823b3da1d6b45a6003864294b6 --- src/slic3r/GUI/GCodeViewer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/slic3r/GUI/GCodeViewer.cpp b/src/slic3r/GUI/GCodeViewer.cpp index 05a141ccc..aa417dafc 100644 --- a/src/slic3r/GUI/GCodeViewer.cpp +++ b/src/slic3r/GUI/GCodeViewer.cpp @@ -924,6 +924,9 @@ void GCodeViewer::init(ConfigOptionMode mode, PresetBundle* preset_bundle) m_gl_data_initialized = true; + if (preset_bundle) + m_nozzle_nums = preset_bundle->get_printer_extruder_count(); + // set to color print by default if use multi extruders if (m_nozzle_nums > 1) { m_view_type_sel = (int)EViewType::Summary;