From ae92bd2fbd2a74d14e2635003554aa76016ab425 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 15 Oct 2022 01:58:54 +0200 Subject: Make video frame rate option respect OK/Cancel. --- src/wx/content_advanced_dialog.cc | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/wx/content_advanced_dialog.cc') diff --git a/src/wx/content_advanced_dialog.cc b/src/wx/content_advanced_dialog.cc index 21cba5e8a..ba2c3f43b 100644 --- a/src/wx/content_advanced_dialog.cc +++ b/src/wx/content_advanced_dialog.cc @@ -197,15 +197,20 @@ ContentAdvancedDialog::filters_changed (vector filters) } -void -ContentAdvancedDialog::set_video_frame_rate () +optional +ContentAdvancedDialog::video_frame_rate() const { - if (_video_frame_rate->GetValue() != wxT("")) { - _content->set_video_frame_rate (locale_convert(wx_to_std(_video_frame_rate->GetValue()))); - } else { - _content->unset_video_frame_rate (); + if (_video_frame_rate->GetValue() == wxT("")) { + return {}; } + return locale_convert(wx_to_std(_video_frame_rate->GetValue())); +} + + +void +ContentAdvancedDialog::set_video_frame_rate () +{ _set_video_frame_rate->Enable (false); } -- cgit v1.2.3