X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Ftime.cpp;h=062b82ad5a075e55e3cd2ab470b2246ffecdf15a;hb=d2f7311f97711e59bd3f9c6ed956d007492b2ab9;hp=e62527812b8451630fee7aa6ba4518a2255915c1;hpb=41c73ed08565103a6004b768d9c198453d98cb62;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/time.cpp b/synfig-core/trunk/src/synfig/time.cpp index e625278..062b82a 100644 --- a/synfig-core/trunk/src/synfig/time.cpp +++ b/synfig-core/trunk/src/synfig/time.cpp @@ -6,7 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore +** Copyright (c) 2007, 2008 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -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;