Fix strange rounding of still image durations (#204).
authorCarl Hetherington <cth@carlh.net>
Thu, 29 Aug 2013 15:12:24 +0000 (16:12 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 29 Aug 2013 15:12:24 +0000 (16:12 +0100)
ChangeLog
src/wx/timing_panel.cc

index b654685a0ec37f85553bf12450ac86fd36c4c25a..c3b671471734b30fbfbe342997cf3dc392accedb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2013-08-29  Carl Hetherington  <cth@carlh.net>
 
+       * Fix strange rounding of still image durations (#204).
+
        * Remove limitation to numbers and periods in the
        server host name dialogue box.
 
index f11a4e5e69c553a60bcc1e1119f8ec90e6fb07ed..ba645cf3240bd7239588cdd6c81469c160b42afc 100644 (file)
@@ -106,7 +106,7 @@ TimingPanel::length_changed ()
 
        shared_ptr<StillImageContent> ic = dynamic_pointer_cast<StillImageContent> (c);
        if (ic) {
-               ic->set_video_length (_length->get (_editor->film()->video_frame_rate()) * ic->video_frame_rate() / TIME_HZ);
+               ic->set_video_length (rint (_length->get (_editor->film()->video_frame_rate()) * ic->video_frame_rate() / TIME_HZ));
        }
 }