From caa5bb38ea159beb35c1aa819e92705c99311d10 Mon Sep 17 00:00:00 2001 From: Noisyfox Date: Mon, 18 May 2026 10:25:05 +0800 Subject: [PATCH] Fix issue that dirty status not updated when switching between variants/extruders --- src/slic3r/GUI/Tab.cpp | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index b27345cf1e..b16280f8f5 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -893,21 +893,9 @@ void Tab::filter_diff_option(std::vector &options) break; } } - if (found) continue; - - // Keep key#index if that exact option is tracked. - if (m_options_list.find(opt) != m_options_list.end()) - continue; - - const std::string base = opt.substr(0, hash_pos); - const std::string idx0 = base + "#0"; - if (m_options_list.find(idx0) != m_options_list.end()) { - opt = idx0; - continue; - } - if (m_options_list.find(base) != m_options_list.end()) - opt = base; + if (!found) opt = opt.substr(0, hash_pos); } + options.erase(std::remove(options.begin(), options.end(), ""), options.end()); } // Update UI according to changes @@ -929,11 +917,9 @@ void Tab::update_changed_ui() } update_custom_dirty(dirty_options, nonsys_options); - - if (m_extruder_switch == nullptr || m_extruder_switch->IsEnabled()) { - filter_diff_option(dirty_options); - filter_diff_option(nonsys_options); - } + + filter_diff_option(dirty_options); + filter_diff_option(nonsys_options); for (auto& it : m_options_list) it.second = m_opt_status_value;