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

+10 -1
View File
@@ -557,7 +557,16 @@ wxBoxSizer *PreferencesDialog::create_item_language_combobox(wxString title, wxS
wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Save"), wxYES_NO | wxCANCEL | wxYES_DEFAULT | wxCENTRE).ShowModal();
if (result == wxID_YES) {
wxGetApp().plater()->save_project();
if (wxGetApp().plater()->save_project() != wxID_YES) {
// The save was cancelled (e.g. the unresolved-plugin warning): do not
// switch languages as if the project had been saved.
combobox->SetSelection(m_current_language_selected);
return;
}
} else if (result != wxID_NO) {
// Cancel or ESC on the save prompt: keep the current language.
combobox->SetSelection(m_current_language_selected);
return;
}
}