From 8d7d3cdebad707c13d8365e2860dfc42666445fd Mon Sep 17 00:00:00 2001 From: dooglus Date: Fri, 29 Feb 2008 15:35:54 +0000 Subject: [PATCH] Add code to output the new time format. git-svn-id: http://svn.voria.com/code@1823 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/synfig/time.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/synfig-core/trunk/src/synfig/time.cpp b/synfig-core/trunk/src/synfig/time.cpp index ea59b8e..062b82a 100644 --- a/synfig-core/trunk/src/synfig/time.cpp +++ b/synfig-core/trunk/src/synfig/time.cpp @@ -204,6 +204,14 @@ Time::get_string(float fps, Time::Format format)const return strprintf("%02d:%02d:%02d",hour,minute,second); } + if (format <= FORMAT_FRAMES) + { + if (fps && fps>0) + return strprintf("%df", round_to_int(time * fps)); + else + return strprintf("%ds", round_to_int(time * 1)); + } + String ret; bool started = false; -- 2.7.4