summaryrefslogtreecommitdiff
path: root/src/wx
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2026-03-12 01:01:54 +0100
committerCarl Hetherington <cth@carlh.net>2026-03-12 01:24:06 +0100
commit4130fef00b6946d771aa416f956f43a8c43adfbe (patch)
treee31511b22c8421b2da74582b84ce2d56a3d15aaf /src/wx
parent5b002572f0fa3773ec52621f6b232caac491f8c4 (diff)
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.
Diffstat (limited to 'src/wx')
-rw-r--r--src/wx/content_advanced_dialog.cc13
-rw-r--r--src/wx/content_advanced_dialog.h2
2 files changed, 10 insertions, 5 deletions
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_ptr<Conte
if (auto const vfr = _content->video_frame_rate()) {
_video_frame_rate->SetValue(std_to_wx(locale_convert<string>(*vfr)));
+ _video_frame_rate_value = *vfr;
}
_burnt_subtitle->SetValue (_content->video && static_cast<bool>(_content->video->burnt_subtitle_language()));
@@ -194,11 +195,7 @@ ContentAdvancedDialog::filters_changed(vector<Filter> const& filters)
optional<double>
ContentAdvancedDialog::video_frame_rate() const
{
- if (_video_frame_rate->GetValue().IsEmpty()) {
- return {};
- }
-
- return locale_convert<double>(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<double>(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<double> _video_frame_rate_value;
};