From 100c6c830ebf215802e128da38260e6e0533ad8c Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 29 Jul 2015 21:00:14 +0100 Subject: Fix find missing function for DCP content (#646). --- ChangeLog | 7 +++++++ src/wx/content_menu.cc | 23 ++++++++++++++--------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6628ef454..61fcd5871 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2015-07-29 Carl Hetherington + + * Fix "find missing" with DCP folders (#646). + + * Fix garbled audio from DCP sources when running + on Windows. + 2015-07-28 c.hetherington * Stop forward-frame button going off the end of the film. diff --git a/src/wx/content_menu.cc b/src/wx/content_menu.cc index 415039cb1..159239345 100644 --- a/src/wx/content_menu.cc +++ b/src/wx/content_menu.cc @@ -234,22 +234,27 @@ ContentMenu::find_missing () /* XXX: a bit nasty */ shared_ptr ic = dynamic_pointer_cast (_content.front ()); - if (ic && !ic->still ()) { + shared_ptr dc = dynamic_pointer_cast (_content.front ()); + + int r = wxID_CANCEL; + boost::filesystem::path path; + + if ((ic && !ic->still ()) || dc) { wxDirDialog* d = new wxDirDialog (0, _("Choose a folder"), wxT (""), wxDD_DIR_MUST_EXIST); - int const r = d->ShowModal (); - if (r == wxID_OK) { - content.reset (new ImageContent (film, boost::filesystem::path (wx_to_std (d->GetPath ())))); - } + r = d->ShowModal (); + path = wx_to_std (d->GetPath ()); d->Destroy (); } else { wxFileDialog* d = new wxFileDialog (0, _("Choose a file"), wxT (""), wxT (""), wxT ("*.*"), wxFD_MULTIPLE); - int const r = d->ShowModal (); - if (r == wxID_OK) { - content = content_factory (film, wx_to_std (d->GetPath ())); - } + r = d->ShowModal (); + path = wx_to_std (d->GetPath ()); d->Destroy (); } + if (r == wxID_OK) { + content = content_factory (film, path); + } + if (!content) { return; } -- cgit v1.2.3