++r;
_description = new wxStaticText (this, wxID_ANY, wxT ("\n \n \n \n \n"), wxDefaultPosition, wxDefaultSize);
- grid->Add (_description, wxGBPosition (r, 0), wxGBSpan (1, 4), wxEXPAND | wxALIGN_CENTER_VERTICAL | wxALL, 6);
+ grid->Add (_description, wxGBPosition (r, 0), wxGBSpan (1, 4), wxEXPAND | wxALIGN_CENTER_VERTICAL, 6);
wxFont font = _description->GetFont();
font.SetStyle(wxFONTSTYLE_ITALIC);
font.SetPointSize(font.GetPointSize() - 1);
} else if (property == VideoContentProperty::VIDEO_FRAME_RATE) {
setup_description ();
} else if (property == VideoContentProperty::COLOUR_CONVERSION) {
- if (!vcs) {
- checked_set (_colour_conversion, 0);
- _edit_colour_conversion_button->Enable (false);
- } else if (vcs->colour_conversion ()) {
+ if (vcs && vcs->colour_conversion ()) {
optional<size_t> preset = vcs->colour_conversion().get().preset ();
vector<PresetColourConversion> cc = PresetColourConversion::all ();
if (preset) {
checked_set (_colour_conversion, preset.get() + 1);
- _edit_colour_conversion_button->Enable (false);
} else {
checked_set (_colour_conversion, cc.size() + 1);
- _edit_colour_conversion_button->Enable (true);
}
} else {
checked_set (_colour_conversion, 0);
- _edit_colour_conversion_button->Enable (false);
}
+
+ setup_sensitivity ();
+
} else if (property == FFmpegContentProperty::FILTERS) {
if (fcs) {
string p = Filter::ffmpeg_string (fcs->filters ());
_filters->Enable (false);
_filters_button->Enable (false);
_colour_conversion->Enable (false);
- _edit_colour_conversion_button->Enable (false);
} else {
VideoContentList video_sel = _parent->selected_video ();
FFmpegContentList ffmpeg_sel = _parent->selected_ffmpeg ();
_filters->Enable (true);
_filters_button->Enable (single && !ffmpeg_sel.empty ());
_colour_conversion->Enable (single && !video_sel.empty ());
- _edit_colour_conversion_button->Enable (true);
+ }
+
+ VideoContentList vc = _parent->selected_video ();
+ shared_ptr<VideoContent> vcs;
+ if (!vc.empty ()) {
+ vcs = vc.front ();
+ }
+
+ if (vcs && vcs->colour_conversion ()) {
+ _edit_colour_conversion_button->Enable (!vcs->colour_conversion().get().preset());
+ } else {
+ _edit_colour_conversion_button->Enable (false);
}
}