fix: warn on preset save when plugin not found (#16929)

* fix: warn on preset save when plugin not found

* refactor: build the unsaved-changes save config in one place

* Fixes clang-tidy

---------

Co-authored-by: Lam Wei Lun <weilun.lam@gmail.com>
This commit is contained in:
Ian ChuaandLam Wei Lun authored and GitHub committed 2026-10-28 13:02:05 +08:00
1 parent 3322f6101c
commit 3a0517831f
15 files changed
+411 -66

No files matched your search

+4 -1
View File
@@ -835,7 +835,10 @@ 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);
// Keep this dialog open when the save was cancelled (e.g. the unresolved-plugin warning), or it
// would close as if the physical printer's preset had been saved.
if (!wxGetApp().get_tab(Preset::TYPE_PRINTER)->save_preset("", false, false, true, m_preset_name))
return;
event.Skip();
}