mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-11-29 08:32:00 -05:00
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:
1 parent
3322f6101c
commit
3a0517831f
15 files changed
+411
-66
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user