From 221555777b72932c6d9eccdbc37e5b8c1be9d62e Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 16 Jun 2013 17:10:59 +0100 Subject: [PATCH] Fix crash on creating new film. Fix setup of ratio selector. --- src/lib/film.cc | 2 +- src/wx/film_editor.cc | 6 ++---- src/wx/film_viewer.cc | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/lib/film.cc b/src/lib/film.cc index 75ec700e0..b50fe67d1 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -101,7 +101,7 @@ Film::Film (string d) , _colour_lut (0) , _j2k_bandwidth (200000000) , _dci_metadata (Config::instance()->default_dci_metadata ()) - , _dcp_video_frame_rate (0) + , _dcp_video_frame_rate (24) , _dcp_audio_channels (MAX_AUDIO_CHANNELS) , _dirty (false) { diff --git a/src/wx/film_editor.cc b/src/wx/film_editor.cc index afd79b08d..c96642124 100644 --- a/src/wx/film_editor.cc +++ b/src/wx/film_editor.cc @@ -596,8 +596,6 @@ FilmEditor::film_changed (Film::Property p) break; case Film::CONTENT: setup_content (); - setup_ratios (); -// setup_ratio (); setup_subtitle_control_sensitivity (); setup_show_audio_sensitivity (); break; @@ -714,7 +712,7 @@ FilmEditor::film_content_changed (weak_ptr weak_content, int property) ++i; ++n; } - + if (i == ratios.end()) { checked_set (_ratio, -1); } else { @@ -1152,7 +1150,7 @@ FilmEditor::setup_content () } if (selected_summary.empty () && !content.empty ()) { - /* Select the item of content if non was selected before */ + /* Select the item of content if none was selected before */ _content->SetItemState (0, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); } } diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index c7a44364f..db2ab9dfe 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -420,7 +420,7 @@ FilmViewer::film_content_changed (weak_ptr, int p) /* Force an update to our frame */ wxScrollEvent ev; slider_moved (ev); - } else if (p == VideoContentProperty::VIDEO_CROP) { + } else if (p == VideoContentProperty::VIDEO_CROP || p == VideoContentProperty::VIDEO_RATIO) { update_from_decoder (); } } -- 2.30.2