2016-05-30 Carl Hetherington <cth@carlh.net>
+ * Add Cancel button to custom colour conversion
+ dialogue (#880).
+
* Give the option to abort the operation when creating
a new film or opening an existing one (#847).
overall_sizer->Add (new wxStaticLine (this, wxID_ANY), 0, wxEXPAND);
overall_sizer->Add (_editor);
- wxSizer* buttons = CreateSeparatedButtonSizer (wxOK);
+ wxSizer* buttons = CreateSeparatedButtonSizer (wxOK | wxCANCEL);
if (buttons) {
overall_sizer->Add (buttons, wxSizerFlags().Expand().DoubleBorder());
}
}
ContentColourConversionDialog* d = new ContentColourConversionDialog (this, vc.front()->video->yuv ());
- d->set (vc.front()->video->colour_conversion().get_value_or (PresetColourConversion::all().front ().conversion));
- d->ShowModal ();
- vc.front()->video->set_colour_conversion (d->get ());
+ d->set (vc.front()->video->colour_conversion().get_value_or (PresetColourConversion::all().front().conversion));
+ if (d->ShowModal() == wxID_OK) {
+ vc.front()->video->set_colour_conversion (d->get ());
+ } else {
+ /* Reset the colour conversion choice */
+ film_content_changed (VideoContentProperty::COLOUR_CONVERSION);
+ }
d->Destroy ();
}