mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-15 01:26:10 +08:00
Fix crash on FreeBSD
On FreeBSD builds, if you try to change a printer/filament/setting option while the dirty flag is set, it crashes. This patch seems to fix the crash, though I'm not sure what the id is actually used for. merill: added the #ifdef __WXGTK__ to not mess with other OSes
This commit is contained in:
parent
0d5add8413
commit
cef7c355a1
@ -656,8 +656,11 @@ void UnsavedChangesDialog::build(Preset::Type type, PresetCollection* dependent_
|
|||||||
add_btn(&m_transfer_btn, m_move_btn_id, "paste_menu", Action::Transfer, _L("Transfer"));
|
add_btn(&m_transfer_btn, m_move_btn_id, "paste_menu", Action::Transfer, _L("Transfer"));
|
||||||
add_btn(&m_discard_btn, m_continue_btn_id, dependent_presets ? "switch_presets" : "exit", Action::Discard, _L("Discard"), false);
|
add_btn(&m_discard_btn, m_continue_btn_id, dependent_presets ? "switch_presets" : "exit", Action::Discard, _L("Discard"), false);
|
||||||
add_btn(&m_save_btn, m_save_btn_id, "save", Action::Save, _L("Save"));
|
add_btn(&m_save_btn, m_save_btn_id, "save", Action::Save, _L("Save"));
|
||||||
|
#ifdef __WXGTK__
|
||||||
|
ScalableButton* cancel_btn = new ScalableButton(this, wxID_ANY, "cross", _L("Cancel"), wxDefaultSize, wxDefaultPosition, wxBORDER_DEFAULT, true, 24);
|
||||||
|
#else
|
||||||
ScalableButton* cancel_btn = new ScalableButton(this, wxID_CANCEL, "cross", _L("Cancel"), wxDefaultSize, wxDefaultPosition, wxBORDER_DEFAULT, true, 24);
|
ScalableButton* cancel_btn = new ScalableButton(this, wxID_CANCEL, "cross", _L("Cancel"), wxDefaultSize, wxDefaultPosition, wxBORDER_DEFAULT, true, 24);
|
||||||
|
#endif
|
||||||
buttons->Add(cancel_btn, 1, wxLEFT|wxRIGHT, 5);
|
buttons->Add(cancel_btn, 1, wxLEFT|wxRIGHT, 5);
|
||||||
cancel_btn->SetFont(btn_font);
|
cancel_btn->SetFont(btn_font);
|
||||||
cancel_btn->Bind(wxEVT_BUTTON, [this](wxEvent&) { this->EndModal(wxID_CANCEL); });
|
cancel_btn->Bind(wxEVT_BUTTON, [this](wxEvent&) { this->EndModal(wxID_CANCEL); });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user