From 39df09be8bc618ad19f09ec36a00985d4295a14f Mon Sep 17 00:00:00 2001 From: SoftFever Date: Tue, 6 Jan 2026 16:31:54 +0800 Subject: [PATCH] fix build errors --- src/slic3r/GUI/GCodeViewer.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/slic3r/GUI/GCodeViewer.cpp b/src/slic3r/GUI/GCodeViewer.cpp index aa31e0b4f3..7b46443149 100644 --- a/src/slic3r/GUI/GCodeViewer.cpp +++ b/src/slic3r/GUI/GCodeViewer.cpp @@ -808,9 +808,9 @@ void GCodeViewer::init(ConfigOptionMode mode, PresetBundle* preset_bundle) // Default view type at first slice. // May be overridden in load() once we know how many tools are actually used in the G-code. m_nozzle_nums = preset_bundle ? preset_bundle->get_printer_extruder_count() : 1; - auto it = std::find(view_type_items.begin(), view_type_items.end(), EViewType::FeatureType); + auto it = std::find(view_type_items.begin(), view_type_items.end(), libvgcode::EViewType::FeatureType); m_view_type_sel = (it != view_type_items.end()) ? std::distance(view_type_items.begin(), it) : 0; - set_view_type(EViewType::FeatureType); + set_view_type(libvgcode::EViewType::FeatureType); BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(": finished"); } @@ -1083,20 +1083,20 @@ void GCodeViewer::load_as_gcode(const GCodeProcessorResult& gcode_result, const m_max_print_height = gcode_result.printable_height; m_z_offset = gcode_result.z_offset; - load_toolpaths(gcode_result, build_volume, exclude_bounding_box); + // load_toolpaths(gcode_result, build_volume, exclude_bounding_box); // ORCA: Only show filament/color print preview if more than one tool/extruder is actually used in the toolpaths. // Only reset back to Toolpaths (FeatureType) if we are currently in ColorPrint and this load is single-tool. - if (m_extruder_ids.size() > 1) { - auto it = std::find(view_type_items.begin(), view_type_items.end(), EViewType::ColorPrint); + if (m_viewer.get_used_extruders_count() > 1) { + auto it = std::find(view_type_items.begin(), view_type_items.end(), libvgcode::EViewType::ColorPrint); if (it != view_type_items.end()) m_view_type_sel = std::distance(view_type_items.begin(), it); - set_view_type(EViewType::ColorPrint); - } else if (m_view_type == EViewType::ColorPrint) { - auto it = std::find(view_type_items.begin(), view_type_items.end(), EViewType::FeatureType); + set_view_type(libvgcode::EViewType::ColorPrint); + } else if (get_view_type() == libvgcode::EViewType::ColorPrint) { + auto it = std::find(view_type_items.begin(), view_type_items.end(), libvgcode::EViewType::FeatureType); if (it != view_type_items.end()) m_view_type_sel = std::distance(view_type_items.begin(), it); - set_view_type(EViewType::FeatureType); + set_view_type(libvgcode::EViewType::FeatureType); } // BBS: data for rendering color arrangement recommendation