From 0f0c54de9fe67782037fd4e3d115b8e7732fe9ed Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 12 Feb 2014 14:31:40 +0000 Subject: [PATCH] Remember last directory in dcpomatic_batch film picker. Requested-by: Brad Miller --- ChangeLog | 3 +++ src/tools/dcpomatic_batch.cc | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 69eec2c0c..a66eb71d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2014-02-12 Carl Hetherington + * Make the batch converter remember its last directory + for the film picker (#318). + * Add dcpomatic_batch to OS X .app. 2014-02-11 Carl Hetherington 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[] = { -- 2.30.2