diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index fa235f69dd..ef830b7f35 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -8000,7 +8000,9 @@ void Tab::update_extruder_variants(int extruder_id, bool reload) m_actual_nozzle_volumes.resize(extruder_nums, NozzleVolumeType::nvtStandard); for (int i = 0; i < extruder_nums; i++) m_actual_nozzle_volumes[i] = (NozzleVolumeType)nozzle_volumes->values[i]; - if (extruder_nums == 2) { + // Orca: a non-Bambu dual-nozzle printer has two extruders but a single variant column, so + // the nozzle switch and sync button have nothing to act on. Only enable with real variants. + if (extruder_nums == 2 && m_preset_bundle->support_different_extruders()) { auto options = generate_extruder_options(); m_extruder_switch->SetOptions(options); diff --git a/tests/libslic3r/test_config_variant_expansion.cpp b/tests/libslic3r/test_config_variant_expansion.cpp index 59f311eae5..14675fd4dc 100644 --- a/tests/libslic3r/test_config_variant_expansion.cpp +++ b/tests/libslic3r/test_config_variant_expansion.cpp @@ -58,6 +58,40 @@ TEST_CASE("apply_override fills nil entries from the 0-based default index", "[C } } +TEST_CASE("support_different_extruders is true only when the printer defines more than one variant column", "[Config]") +{ + int extruder_count = 0; + + SECTION("a non-Bambu dual-nozzle printer with one variant column reports false") { + DynamicPrintConfig config; + config.option("nozzle_diameter", true)->values = {0.4, 0.4}; + // Both extruders resolve to the same default variant, so there is only one column. + config.option("extruder_variant_list", true)->values = {"Direct Drive Standard", + "Direct Drive Standard"}; + REQUIRE(config.support_different_extruders(extruder_count) == false); + REQUIRE(extruder_count == 2); + } + + SECTION("a Bambu H2D-style printer with distinct variants reports true") { + DynamicPrintConfig config; + config.option("nozzle_diameter", true)->values = {0.4, 0.4}; + config.option("extruder_variant_list", true)->values = { + "Direct Drive Standard,Direct Drive High Flow", + "Direct Drive Standard,Direct Drive High Flow,Direct Drive TPU High Flow"}; + REQUIRE(config.support_different_extruders(extruder_count) == true); + REQUIRE(extruder_count == 2); + } + + SECTION("a many-toolhead printer that never opts into variants reports false") { + // A Snapmaker U1 has four identical toolheads and never defines extruder_variant_list, + // so the config falls back to a single default variant token. + DynamicPrintConfig config; + config.option("nozzle_diameter", true)->values = {0.4, 0.4, 0.4, 0.4}; + REQUIRE(config.support_different_extruders(extruder_count) == false); + REQUIRE(extruder_count == 4); + } +} + TEST_CASE("get_config_index_base resolves (volume type, extruder type, id) to a slot", "[Config]") { const std::vector variant_list = {"Direct Drive Standard", "Direct Drive High Flow",