X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fcontent_panel.cc;h=c18520c30b4b677453372736dd78e40f0ba70d70;hb=b7e65adf286ce20918797a06a910ededf8f07b7b;hp=e035d1795a46638d0f68607785d22e7ef1fd51d4;hpb=98a10c9874d28e2e52f7495549b80528372ffbfb;p=dcpomatic.git diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc index e035d1795..c18520c30 100644 --- a/src/wx/content_panel.cc +++ b/src/wx/content_panel.cc @@ -654,15 +654,12 @@ ContentPanel::add_folder(boost::filesystem::path folder) auto ic = dynamic_pointer_cast (i); if (ic) { auto e = new ImageSequenceDialog (_splitter); - int const r = e->ShowModal(); - auto const frame_rate = e->frame_rate (); - e->Destroy (); + ScopeGuard sg = [e]() { e->Destroy(); }; - if (r != wxID_OK) { + if (e->ShowModal() != wxID_OK) { return; } - - ic->set_video_frame_rate(_film, frame_rate); + ic->set_video_frame_rate(_film, e->frame_rate()); } _film->examine_and_add_content (i);