X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Fwx%2Ffile_dialog.cc;h=b65077784747ca57f90404a9e87cf3d9cc8f186b;hp=7aee394937aa59c411949cf52991e8022c961597;hb=a2bf32c1419a56e6aaee7e742961b9f471a9dd79;hpb=940812b93bade4ac8fd41ee4fb29f3f799815b83 diff --git a/src/wx/file_dialog.cc b/src/wx/file_dialog.cc index 7aee39493..b65077784 100644 --- a/src/wx/file_dialog.cc +++ b/src/wx/file_dialog.cc @@ -28,6 +28,7 @@ using std::vector; +using boost::optional; FileDialog::FileDialog( @@ -35,12 +36,16 @@ FileDialog::FileDialog( wxString title, wxString allowed, long style, - std::string initial_path_key + std::string initial_path_key, + optional override_path ) : wxFileDialog( parent, title, - std_to_wx(Config::instance()->initial_path(initial_path_key).get_value_or(home_directory()).string()), + std_to_wx( + override_path.get_value_or( + Config::instance()->initial_path(initial_path_key).get_value_or(home_directory()) + ).string()), wxEmptyString, allowed, style