Fix an issue that sync ams btn is not show/hide after printer agent changes

This commit is contained in:
SoftFever committed 2026-02-02 12:21:41 +08:00
1 parent 86421c6378
commit d817a4d5d4
2 files changed
+16 -8

No files matched your search

+6 -1
View File
@@ -820,8 +820,13 @@ void PhysicalPrinterDialog::check_host_key_valid()
void PhysicalPrinterDialog::OnOK(wxEvent& event)
{
wxGetApp().get_tab(Preset::TYPE_PRINTER)->save_preset("", false, false, true, m_preset_name );
wxGetApp().get_tab(Preset::TYPE_PRINTER)->save_preset("", false, false, true, m_preset_name);
event.Skip();
// Defer printer agent switch to ensure preset save completes first
wxGetApp().CallAfter([] {
wxGetApp().switch_printer_agent();
});
}
}} // namespace Slic3r::GUI