Fix failure to reset state to "to fit DCP" properly (#2081).
[dcpomatic.git] / src / wx / video_panel.cc
index c5a48f986e0931662741416683abe3f7e0557c4e..33961ea1dcae72d60ba9ab75c2e89f5d4213b625 100644 (file)
@@ -64,6 +64,13 @@ using namespace boost::placeholders;
 
 VideoPanel::VideoPanel (ContentPanel* p)
        : ContentSubPanel (p, _("Video"))
+{
+
+}
+
+
+void
+VideoPanel::create ()
 {
        _reference = new CheckBox (this, _("Use this DCP's video as OV and make VF"));
        _reference_note = new StaticText (this, wxT(""));
@@ -221,6 +228,8 @@ VideoPanel::VideoPanel (ContentPanel* p)
        _top_bottom_link->Bind               (wxEVT_TOGGLEBUTTON, boost::bind(&VideoPanel::top_bottom_link_clicked, this));
 
        add_to_grid ();
+
+       _sizer->Layout ();
 }
 
 
@@ -375,7 +384,8 @@ VideoPanel::film_content_changed (int property)
        if (property == ContentProperty::VIDEO_FRAME_RATE ||
            property == VideoContentProperty::FRAME_TYPE ||
            property == VideoContentProperty::CROP ||
-           property == VideoContentProperty::SCALE) {
+           property == VideoContentProperty::CUSTOM_RATIO ||
+           property == VideoContentProperty::CUSTOM_SIZE) {
                setup_description ();
        } else if (property == VideoContentProperty::COLOUR_CONVERSION) {
                boost::unordered_set<optional<ColourConversion>> check;
@@ -690,6 +700,7 @@ VideoPanel::scale_fit_clicked ()
 {
        for (auto i: _parent->selected_video()) {
                i->video->set_custom_ratio (optional<float>());
+               i->video->set_custom_size (optional<dcp::Size>());
        }
 }