Use the same default folder for add DCP as add files (#2348).
authorCarl Hetherington <cth@carlh.net>
Mon, 5 Dec 2022 19:51:41 +0000 (20:51 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 5 Dec 2022 19:51:41 +0000 (20:51 +0100)
src/wx/content_panel.cc

index 3dde85b43cd0420b2dd96c35d86311e6586754de..9de22e8446639c304a70467bdec046bfa9947627 100644 (file)
@@ -673,7 +673,9 @@ ContentPanel::add_folder(boost::filesystem::path folder)
 void
 ContentPanel::add_dcp_clicked ()
 {
-       auto d = new wxDirDialog (_splitter, _("Choose a DCP folder"), wxT(""), wxDD_DIR_MUST_EXIST);
+       auto const initial_path = Config::instance()->add_files_path();
+
+       auto d = new wxDirDialog(_splitter, _("Choose a DCP folder"), std_to_wx(initial_path ? initial_path->string() : home_directory().string()), wxDD_DIR_MUST_EXIST);
        ScopeGuard sg = [d]() { d->Destroy(); };
        int r = d->ShowModal ();
        if (r != wxID_OK) {