Open file dialog starts in the configured DCP directory (#70).
[dcpomatic.git] / src / tools / dcpomatic.cc
index af620c5a2e93c487a10c1d5c3a6b922526abfe3c..1fea4fb1a3b89595e365ebd42c54245a3f24668c 100644 (file)
@@ -354,7 +354,13 @@ private:
 
        void file_open ()
        {
-               wxDirDialog* c = new wxDirDialog (this, _("Select film to open"), wxStandardPaths::Get().GetDocumentsDir(), wxDEFAULT_DIALOG_STYLE | wxDD_DIR_MUST_EXIST);
+               wxDirDialog* c = new wxDirDialog (
+                       this,
+                       _("Select film to open"),
+                       std_to_wx (Config::instance()->default_directory_or (wx_to_std (wxStandardPaths::Get().GetDocumentsDir())).string ()),
+                       wxDEFAULT_DIALOG_STYLE | wxDD_DIR_MUST_EXIST
+                       );
+               
                int r;
                while (1) {
                        r = c->ShowModal ();