summaryrefslogtreecommitdiff
path: root/src/wx/file_dialog.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/wx/file_dialog.cc')
-rw-r--r--src/wx/file_dialog.cc9
1 files changed, 7 insertions, 2 deletions
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<boost::filesystem::path> 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