summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/wx/new_film_dialog.cc9
-rw-r--r--src/wx/new_film_dialog.h2
2 files changed, 8 insertions, 3 deletions
diff --git a/src/wx/new_film_dialog.cc b/src/wx/new_film_dialog.cc
index 737b07fbb..191482a7c 100644
--- a/src/wx/new_film_dialog.cc
+++ b/src/wx/new_film_dialog.cc
@@ -29,7 +29,7 @@
using namespace std;
using namespace boost;
-string NewFilmDialog::_directory = Config::instance()->default_directory_or (wx_to_std (wxStandardPaths::Get().GetDocumentsDir()));
+boost::optional<string> NewFilmDialog::_directory;
NewFilmDialog::NewFilmDialog (wxWindow* parent)
: wxDialog (parent, wxID_ANY, _("New Film"))
@@ -51,7 +51,12 @@ NewFilmDialog::NewFilmDialog (wxWindow* parent)
#else
_folder = new wxDirPickerCtrl (this, wxDD_DIR_MUST_EXIST);
#endif
- _folder->SetPath (std_to_wx (_directory));
+
+ if (!_directory) {
+ _directory = Config::instance()->default_directory_or (wx_to_std (wxStandardPaths::Get().GetDocumentsDir()));
+ }
+
+ _folder->SetPath (std_to_wx (_directory.get()));
table->Add (_folder, 1, wxEXPAND);
wxSizer* buttons = CreateSeparatedButtonSizer (wxOK | wxCANCEL);
diff --git a/src/wx/new_film_dialog.h b/src/wx/new_film_dialog.h
index 715f71f51..bfcbd423c 100644
--- a/src/wx/new_film_dialog.h
+++ b/src/wx/new_film_dialog.h
@@ -37,5 +37,5 @@ private:
#else
wxDirPickerCtrl* _folder;
#endif
- static std::string _directory;
+ static boost::optional<std::string> _directory;
};