From aa4dd7dfd5bb01639b7648c4738b754eabe6f2ee Mon Sep 17 00:00:00 2001 From: Kiss Lorand <50251547+kisslorand@users.noreply.github.com> Date: Thu, 23 Apr 2026 23:10:50 +0300 Subject: [PATCH] Fix: Dirty-state marker ("*") not shown for edited system printer presets (#11900) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix missing dirty marker for edited system printer presets System printer presets did not display the modified (“*”) marker in the sidebar when edited. Unlike other preset types, printer presets use `printer_model` as their display label, bypassing the normal dirty-state formatting. This patch prepends the modified suffix to the displayed name when the selected system printer preset is dirty, restoring consistent UI behavior across all preset types. --- src/slic3r/GUI/PresetComboBoxes.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/PresetComboBoxes.cpp b/src/slic3r/GUI/PresetComboBoxes.cpp index 9296d0100a..fa427cc493 100644 --- a/src/slic3r/GUI/PresetComboBoxes.cpp +++ b/src/slic3r/GUI/PresetComboBoxes.cpp @@ -1210,14 +1210,24 @@ void PlaterPresetComboBox::update() //BBS: move system to the end if (m_type == Preset::TYPE_PRINTER) { auto printer_model = preset.config.opt_string("printer_model"); - name = from_u8(printer_model); + + // ORCA: Make system printer presets display the dirty "*" prefix when edited. + name = from_u8(is_selected && preset.is_dirty ? Preset::suffix_modified() + printer_model : printer_model); + if (system_printer_models.count(printer_model) == 0) { system_presets.emplace(name, bmp); system_printer_models.insert(printer_model); } + else if (is_selected) { + const wxString alternate_name = from_u8(preset.is_dirty ? printer_model : Preset::suffix_modified() + printer_model); + // Remove the old preset name if exists, and add the new one with the same name but with modified suffix if needed. + if (system_presets.erase(alternate_name)) + system_presets.emplace(name, bmp); + } } else { system_presets.emplace(name, bmp); } + if (is_selected) { tooltip = get_tooltip(preset); selected_system_preset = name;