- auto d = new CustomScaleDialog (this, vc->size(), _parent->film()->frame_size(), vc->custom_ratio(), vc->custom_size());
- int const r = d->ShowModal ();
- if (r == wxID_OK) {
- for (auto i: _parent->selected_video()) {
- i->video->set_custom_ratio (d->custom_ratio());
- i->video->set_custom_size (d->custom_size());
- }
+ CustomScaleDialog dialog(this, vc->size(), _parent->film()->frame_size(), vc->custom_ratio(), vc->custom_size());
+ if (dialog.ShowModal() != wxID_OK) {
+ return false;
+ }
+
+ for (auto i: _parent->selected_video()) {
+ i->video->set_custom_ratio(dialog.custom_ratio());
+ i->video->set_custom_size(dialog.custom_size());