diff options
author | Lukas Matena <lukasmatena@seznam.cz> | 2019-08-15 13:52:56 +0300 |
---|---|---|
committer | Lukas Matena <lukasmatena@seznam.cz> | 2019-08-15 13:52:56 +0300 |
commit | c8ac46df43f0ae467edc02f7587094f7facfe16f (patch) | |
tree | a1ec37e245070af0938db75b719748a2d5bba5f1 /src/slic3r/GUI/Field.cpp | |
parent | 15744f021a0aa84e3386fb8579cc47e43e427eb5 (diff) |
Fixed some memory leaks related to heap-allocated wxDialogs
Some correctly destroyed dialogs were also converted to stack-allocated
Diffstat (limited to 'src/slic3r/GUI/Field.cpp')
-rw-r--r-- | src/slic3r/GUI/Field.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/slic3r/GUI/Field.cpp b/src/slic3r/GUI/Field.cpp index 39924e44c..3e3026a4c 100644 --- a/src/slic3r/GUI/Field.cpp +++ b/src/slic3r/GUI/Field.cpp @@ -206,8 +206,8 @@ void Field::get_value_by_opt_type(wxString& str) const wxString msg_text = wxString::Format(_(L("Do you mean %s%% instead of %s %s?\n" "Select YES if you want to change this value to %s%%, \n" "or NO if you are sure that %s %s is a correct value.")), stVal, stVal, sidetext, stVal, stVal, sidetext); - auto dialog = new wxMessageDialog(m_parent, msg_text, _(L("Parameter validation")), wxICON_WARNING | wxYES | wxNO); - if (dialog->ShowModal() == wxID_YES) { + wxMessageDialog dialog(m_parent, msg_text, _(L("Parameter validation")), wxICON_WARNING | wxYES | wxNO); + if (dialog.ShowModal() == wxID_YES) { set_value(wxString::Format("%s%%", stVal), false/*true*/); str += "%%"; } |