From 0f0c54de9fe67782037fd4e3d115b8e7732fe9ed Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 12 Feb 2014 14:31:40 +0000 Subject: Remember last directory in dcpomatic_batch film picker. Requested-by: Brad Miller --- src/tools/dcpomatic_batch.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/tools/dcpomatic_batch.cc b/src/tools/dcpomatic_batch.cc index 41cb23e73..58fbaec98 100644 --- a/src/tools/dcpomatic_batch.cc +++ b/src/tools/dcpomatic_batch.cc @@ -168,6 +168,10 @@ private: void add_film () { wxDirDialog* c = new wxDirDialog (this, _("Select film to open"), wxStandardPaths::Get().GetDocumentsDir(), wxDEFAULT_DIALOG_STYLE | wxDD_DIR_MUST_EXIST); + if (_last_parent) { + c->SetPath (std_to_wx (_last_parent.get().string ())); + } + int r; while (1) { r = c->ShowModal (); @@ -190,8 +194,12 @@ private: } } + _last_parent = boost::filesystem::path (wx_to_std (c->GetPath ())).parent_path (); + c->Destroy (); } + + boost::optional _last_parent; }; static const wxCmdLineEntryDesc command_line_description[] = { -- cgit v1.2.3