X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fvideo_panel.cc;h=83c29611d74c6a9acc6ac62a395be0c573809edf;hb=4b76291eb0328840de4c5938a1be6340e5dea0fe;hp=07a929e1096c6429fd86a06cd67fe6d77bbbccb7;hpb=19e47294d1de485a12dccf2c25bec0c8144049e8;p=dcpomatic.git diff --git a/src/wx/video_panel.cc b/src/wx/video_panel.cc index 07a929e10..83c29611d 100644 --- a/src/wx/video_panel.cc +++ b/src/wx/video_panel.cc @@ -38,8 +38,11 @@ #include "lib/ratio.h" #include "lib/util.h" #include "lib/video_content.h" +#include +LIBDCP_DISABLE_WARNINGS #include #include +LIBDCP_ENABLE_WARNINGS #include #include #include @@ -118,7 +121,7 @@ VideoPanel::create () new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(crop_width, -1)), VideoContentProperty::CROP, &Content::video, - boost::mem_fn (&VideoContent::left_crop), + boost::mem_fn (&VideoContent::requested_left_crop), boost::mem_fn (&VideoContent::set_left_crop), boost::bind (&VideoPanel::left_crop_changed, this) ); @@ -132,7 +135,7 @@ VideoPanel::create () new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(crop_width, -1)), VideoContentProperty::CROP, &Content::video, - boost::mem_fn (&VideoContent::right_crop), + boost::mem_fn (&VideoContent::requested_right_crop), boost::mem_fn (&VideoContent::set_right_crop), boost::bind (&VideoPanel::right_crop_changed, this) ); @@ -143,7 +146,7 @@ VideoPanel::create () new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(crop_width, -1)), VideoContentProperty::CROP, &Content::video, - boost::mem_fn (&VideoContent::top_crop), + boost::mem_fn (&VideoContent::requested_top_crop), boost::mem_fn (&VideoContent::set_top_crop), boost::bind (&VideoPanel::top_crop_changed, this) ); @@ -157,7 +160,7 @@ VideoPanel::create () new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(crop_width, -1)), VideoContentProperty::CROP, &Content::video, - boost::mem_fn (&VideoContent::bottom_crop), + boost::mem_fn (&VideoContent::requested_bottom_crop), boost::mem_fn (&VideoContent::set_bottom_crop), boost::bind (&VideoPanel::bottom_crop_changed, this) ); @@ -384,7 +387,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> check; @@ -699,7 +703,10 @@ VideoPanel::scale_fit_clicked () { for (auto i: _parent->selected_video()) { i->video->set_custom_ratio (optional()); + i->video->set_custom_size (optional()); } + + setup_sensitivity (); } @@ -709,6 +716,8 @@ VideoPanel::scale_custom_clicked () if (!scale_custom_edit_clicked()) { _scale_fit->SetValue (true); } + + setup_sensitivity (); } @@ -757,7 +766,7 @@ VideoPanel::left_crop_changed () _left_changed_last = true; if (_left_right_link->GetValue()) { for (auto i: _parent->selected_video()) { - i->video->set_right_crop (i->video->left_crop()); + i->video->set_right_crop (i->video->requested_left_crop()); } } } @@ -769,7 +778,7 @@ VideoPanel::right_crop_changed () _left_changed_last = false; if (_left_right_link->GetValue()) { for (auto i: _parent->selected_video()) { - i->video->set_left_crop (i->video->right_crop()); + i->video->set_left_crop (i->video->requested_right_crop()); } } } @@ -781,7 +790,7 @@ VideoPanel::top_crop_changed () _top_changed_last = true; if (_top_bottom_link->GetValue()) { for (auto i: _parent->selected_video()) { - i->video->set_bottom_crop (i->video->top_crop()); + i->video->set_bottom_crop (i->video->requested_top_crop()); } } } @@ -793,10 +802,9 @@ VideoPanel::bottom_crop_changed () _top_changed_last = false; if (_top_bottom_link->GetValue()) { for (auto i: _parent->selected_video()) { - i->video->set_top_crop (i->video->bottom_crop()); + i->video->set_top_crop (i->video->requested_bottom_crop()); } } } -