diff options
Diffstat (limited to 'src/wx/content_menu.cc')
| -rw-r--r-- | src/wx/content_menu.cc | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/src/wx/content_menu.cc b/src/wx/content_menu.cc index 6c4864239..cae56283b 100644 --- a/src/wx/content_menu.cc +++ b/src/wx/content_menu.cc @@ -43,6 +43,7 @@ #include "lib/image_content.h" #include "lib/job_manager.h" #include "lib/playlist.h" +#include "lib/scope_guard.h" #include "lib/video_content.h" #include <dcp/cpl.h> #include <dcp/decrypted_kdm.h> @@ -461,9 +462,31 @@ ContentMenu::properties () void ContentMenu::advanced () { - auto d = new ContentAdvancedDialog (_parent, _content.front()); - d->ShowModal (); - d->Destroy (); + DCPOMATIC_ASSERT(!_content.empty()); + + auto content = _content.front(); + auto dialog = new ContentAdvancedDialog(_parent, content); + ScopeGuard sg = [dialog]() { dialog->Destroy(); }; + + if (dialog->ShowModal() == wxID_CANCEL) { + return; + } + + if (content->video) { + content->video->set_use(!dialog->ignore_video()); + content->video->set_burnt_subtitle_language(dialog->burnt_subtitle_language()); + } + + auto ffmpeg = dynamic_pointer_cast<FFmpegContent>(content); + if (ffmpeg) { + ffmpeg->set_filters(dialog->filters()); + } + + if (dialog->video_frame_rate()) { + content->set_video_frame_rate(*dialog->video_frame_rate()); + } else { + content->unset_video_frame_rate(); + } } |
