X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fdir_picker_ctrl.cc;h=ec7854764e048c435819e129467c33a051f0a28f;hb=324278cc8459e4d7d907b03e0748cf1b33f294f4;hp=05b680288c248baaf0605f88d67eac45e71556d5;hpb=8cb200670cbb98cff22695b1e693533d1160911d;p=dcpomatic.git diff --git a/src/wx/dir_picker_ctrl.cc b/src/wx/dir_picker_ctrl.cc index 05b680288..ec7854764 100644 --- a/src/wx/dir_picker_ctrl.cc +++ b/src/wx/dir_picker_ctrl.cc @@ -19,6 +19,7 @@ #include #include +#include #include #include "dir_picker_ctrl.h" #include "wx_util.h" @@ -40,9 +41,6 @@ DirPickerCtrl::DirPickerCtrl (wxWindow* parent) SetSizerAndFit (_sizer); _browse->Connect (wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (DirPickerCtrl::browse_clicked), 0, this); - - /* Do this after the fit so that our folder label stays long */ - SetPath (wxStandardPaths::Get().GetDocumentsDir()); } void @@ -53,12 +51,11 @@ DirPickerCtrl::SetPath (wxString p) if (_path == wxStandardPaths::Get().GetDocumentsDir()) { _folder->SetLabel (_("My Documents")); } else { -#if BOOST_FILESYSTEM_VERSION == 3 _folder->SetLabel (std_to_wx (filesystem::path (wx_to_std (_path)).leaf().string())); -#else - _folder->SetLabel (std_to_wx (filesystem::path (wx_to_std (_path)).leaf())); -#endif } + + wxCommandEvent ev (wxEVT_COMMAND_DIRPICKER_CHANGED, wxID_ANY); + GetEventHandler()->ProcessEvent (ev); } wxString