Merge master.
[dcpomatic.git] / src / wx / dir_picker_ctrl.cc
index cb811fc1087a26839832a5b73f1bdb735d1d0ba3..ec7854764e048c435819e129467c33a051f0a28f 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <wx/wx.h>
 #include <wx/stdpaths.h>
+#include <wx/filepicker.h>
 #include <boost/filesystem.hpp>
 #include "dir_picker_ctrl.h"
 #include "wx_util.h"
@@ -50,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