diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-07-24 22:25:43 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-07-24 22:25:43 +0100 |
| commit | 9ee95f058263c03f5f88a6db31becb8788ee47e8 (patch) | |
| tree | 568246e3e478a34db84390f5f53c09674c37a817 /src/wx/dir_picker_ctrl.cc | |
| parent | 2ee5d40d5ce7406ce4f1975c4fbf88f70dbe2106 (diff) | |
Handle cancel properly on dir picker.
Diffstat (limited to 'src/wx/dir_picker_ctrl.cc')
| -rw-r--r-- | src/wx/dir_picker_ctrl.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wx/dir_picker_ctrl.cc b/src/wx/dir_picker_ctrl.cc index ec7854764..962dd50ec 100644 --- a/src/wx/dir_picker_ctrl.cc +++ b/src/wx/dir_picker_ctrl.cc @@ -68,7 +68,8 @@ void DirPickerCtrl::browse_clicked (wxCommandEvent &) { wxDirDialog* d = new wxDirDialog (this); - d->ShowModal (); - SetPath (d->GetPath ()); + if (d->ShowModal () == wxID_OK) { + SetPath (d->GetPath ()); + } d->Destroy (); } |
