summaryrefslogtreecommitdiff
path: root/src/wx/timing_panel.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/wx/timing_panel.cc')
-rw-r--r--src/wx/timing_panel.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/wx/timing_panel.cc b/src/wx/timing_panel.cc
index d7ed46f46..653e44669 100644
--- a/src/wx/timing_panel.cc
+++ b/src/wx/timing_panel.cc
@@ -409,9 +409,16 @@ TimingPanel::video_frame_rate_changed ()
void
TimingPanel::set_video_frame_rate ()
{
- double const fr = locale_convert<double> (wx_to_std (_video_frame_rate->GetValue ()));
+ optional<double> fr;
+ if (_video_frame_rate->GetValue() != wxT("")) {
+ fr = locale_convert<double> (wx_to_std (_video_frame_rate->GetValue ()));
+ }
BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
- i->set_video_frame_rate (fr);
+ if (fr) {
+ i->set_video_frame_rate (*fr);
+ } else {
+ i->unset_video_frame_rate ();
+ }
}
_set_video_frame_rate->Enable (false);