Update Plater.cpp

This commit is contained in:
yw4z
2025-11-20 12:12:27 +03:00
parent b90a66477f
commit 9af23c2a74

View File

@@ -1703,6 +1703,7 @@ Sidebar::Sidebar(Plater *parent)
p->editing_filament = -1;
if (p->combo_printer->switch_to_tab())
p->editing_filament = 0;
// ORCA clicking edit button not triggers wxEVT_KILL_FOCUS wxEVT_LEAVE_WINDOW make changes manually to prevent stucked colors when opening printer settings
p->panel_printer_preset->SetBorderColor(panel_color.bd_normal);
p->btn_edit_printer->Hide();
p->panel_printer_preset->Layout();
@@ -2899,6 +2900,13 @@ void Sidebar::sys_color_changed()
p->image_printer->SetSize(FromDIP(PRINTER_THUMBNAIL_SIZE));
p->image_printer_bed->SetSize(FromDIP(PRINTER_THUMBNAIL_SIZE));
// call a kill focus event to ensure new colors applied
for (ComboBox* combo : std::vector<ComboBox*>{p->combo_printer, p->combo_nozzle_dia, p->combo_printer_bed}){
wxFocusEvent fakeEvent(wxEVT_KILL_FOCUS);
fakeEvent.SetEventObject(combo);
combo->HandleWindowEvent(fakeEvent);
}
// BBS
obj_list()->sys_color_changed();
obj_layers()->sys_color_changed();