Fix issue that modified highlight not properly handled for printer_options_with_variant_2 options

This commit is contained in:
Noisyfox
2026-06-23 22:21:49 +08:00
parent 14ad533d91
commit cc6929e506

View File

@@ -1211,7 +1211,13 @@ void Tab::check_extruder_options_status(int index, bool &sys_extruder, bool &mod
if (m_type == Preset::TYPE_FILAMENT && kvp.second.second == -1) {
continue;
}
std::string target_opt_key = base_opt_key + "#" + std::to_string(config_index);
unsigned int stride = 1;
if (printer_options_with_variant_2.count(base_opt_key) > 0) {
stride = 2;
}
std::string target_opt_key = base_opt_key + "#" + std::to_string(config_index * stride);
auto status_iter = m_all_extruder_options_status.find(target_opt_key);
if (status_iter != m_all_extruder_options_status.end()) {