diff options
Diffstat (limited to 'src/wx/file_picker_ctrl.cc')
| -rw-r--r-- | src/wx/file_picker_ctrl.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/wx/file_picker_ctrl.cc b/src/wx/file_picker_ctrl.cc index 284f7bc99..bf4877891 100644 --- a/src/wx/file_picker_ctrl.cc +++ b/src/wx/file_picker_ctrl.cc @@ -83,12 +83,11 @@ FilePickerCtrl::browse_clicked () if (_warn_overwrite) { style |= wxFD_OVERWRITE_PROMPT; } - wxFileDialog* d = new wxFileDialog (this, _prompt, wxEmptyString, wxEmptyString, _wildcard, style); - d->SetPath (_path); - if (d->ShowModal () == wxID_OK) { - SetPath (d->GetPath ()); + wxFileDialog dialog(this, _prompt, wxEmptyString, wxEmptyString, _wildcard, style); + dialog.SetPath(_path); + if (dialog.ShowModal() == wxID_OK) { + SetPath(dialog.GetPath()); } - d->Destroy (); } void |
