From 4130fef00b6946d771aa416f956f43a8c43adfbe Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 12 Mar 2026 01:01:54 +0100 Subject: Fix Set button on override frame rate to do what it was meant to. Before this, the entered video frame rate would be taken no matter if Set was clicked or not. --- src/wx/content_advanced_dialog.cc | 13 ++++++++----- src/wx/content_advanced_dialog.h | 2 ++ 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'src/wx') diff --git a/src/wx/content_advanced_dialog.cc b/src/wx/content_advanced_dialog.cc index c16ab637f..be32ff9e6 100644 --- a/src/wx/content_advanced_dialog.cc +++ b/src/wx/content_advanced_dialog.cc @@ -127,6 +127,7 @@ ContentAdvancedDialog::ContentAdvancedDialog (wxWindow* parent, shared_ptrvideo_frame_rate()) { _video_frame_rate->SetValue(std_to_wx(locale_convert(*vfr))); + _video_frame_rate_value = *vfr; } _burnt_subtitle->SetValue (_content->video && static_cast(_content->video->burnt_subtitle_language())); @@ -194,11 +195,7 @@ ContentAdvancedDialog::filters_changed(vector const& filters) optional ContentAdvancedDialog::video_frame_rate() const { - if (_video_frame_rate->GetValue().IsEmpty()) { - return {}; - } - - return locale_convert(wx_to_std(_video_frame_rate->GetValue())); + return _video_frame_rate_value; } @@ -206,6 +203,12 @@ void ContentAdvancedDialog::set_video_frame_rate () { _set_video_frame_rate->Enable (false); + auto const value = _video_frame_rate->GetValue(); + if (!value.IsEmpty()) { + _video_frame_rate_value = locale_convert(wx_to_std(_video_frame_rate->GetValue())); + } else { + _video_frame_rate_value = boost::none; + } } diff --git a/src/wx/content_advanced_dialog.h b/src/wx/content_advanced_dialog.h index 8f27fd822..4b00c4d30 100644 --- a/src/wx/content_advanced_dialog.h +++ b/src/wx/content_advanced_dialog.h @@ -69,5 +69,7 @@ private: CheckBox* _burnt_subtitle; LanguageTagWidget* _burnt_subtitle_language; CheckBox* _ignore_video; + + boost::optional _video_frame_rate_value; }; -- cgit v1.2.3