mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-26 10:21:00 +00:00
Merge branch 'main' into cad-mainline
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include "OptionsGroup.hpp"
|
||||
#include "GUI_App.hpp"
|
||||
#include "MainFrame.hpp"
|
||||
#include "WebViewDialog.hpp"
|
||||
#include "Plater.hpp"
|
||||
#include "GLCanvas3D.hpp" // ORCA: for live preview refresh when toggling "Dim lower layers"
|
||||
#include "MsgDialog.hpp"
|
||||
@@ -509,26 +510,14 @@ wxBoxSizer *PreferencesDialog::create_item_language_combobox(wxString title, wxS
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// the dialog needs to be destroyed before the call to switch_language()
|
||||
// or sometimes the application crashes into wxDialogBase() destructor
|
||||
// so we put it into an inner scope
|
||||
MessageDialog msg_wingow(nullptr, _L("Switching languages requires the application to restart.\n") + "\n" + _L("Do you want to continue?"),
|
||||
L("Language selection"), wxICON_QUESTION | wxOK | wxCANCEL);
|
||||
if (msg_wingow.ShowModal() == wxID_CANCEL) {
|
||||
MessageDialog msg_window(nullptr, _L("Switching languages requires the application to restart.\n") + "\n" + _L("Do you want to continue?"),
|
||||
_L("Language selection"), wxICON_QUESTION | wxOK | wxCANCEL);
|
||||
if (msg_window.ShowModal() == wxID_CANCEL) {
|
||||
combobox->SetSelection(m_current_language_selected);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
auto check = [](bool yes_or_no) {
|
||||
// if (yes_or_no)
|
||||
// return true;
|
||||
int act_btns = ActionButtons::SAVE;
|
||||
return wxGetApp().check_and_keep_current_preset_changes(_L("Switching application language"),
|
||||
_L("Switching application language while some presets are modified."), act_btns);
|
||||
};
|
||||
|
||||
m_current_language_selected = combobox->GetSelection();
|
||||
if (m_current_language_selected >= 0 && m_current_language_selected < vlist.size()) {
|
||||
m_pending_language = vlist[m_current_language_selected]->CanonicalName.ToUTF8().data();
|
||||
@@ -1033,11 +1022,6 @@ wxBoxSizer *PreferencesDialog::create_item_checkbox(wxString title, wxString too
|
||||
app_config->set_bool(param, checkbox->GetValue());
|
||||
app_config->save();
|
||||
|
||||
// if (param == "staff_pick_switch") {
|
||||
// bool pbool = app_config->get("staff_pick_switch") == "true";
|
||||
// wxGetApp().switch_staff_pick(pbool);
|
||||
// }
|
||||
|
||||
if (param == "sync_user_preset") {
|
||||
bool sync = app_config->get("sync_user_preset") == "true" ? true : false;
|
||||
if (sync) {
|
||||
|
||||
Reference in New Issue
Block a user