From 39116040c58584133510f3af12456f8f8e055e3c Mon Sep 17 00:00:00 2001 From: dooglus Date: Wed, 6 Feb 2008 12:13:57 +0000 Subject: [PATCH] Don't leave a trailing space on the time if there are no frames. git-svn-id: http://svn.voria.com/code@1606 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/synfig/time.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/synfig-core/trunk/src/synfig/time.cpp b/synfig-core/trunk/src/synfig/time.cpp index 6755b80..eb4dd50 100644 --- a/synfig-core/trunk/src/synfig/time.cpp +++ b/synfig-core/trunk/src/synfig/time.cpp @@ -209,13 +209,13 @@ Time::get_string(float fps, Time::Format format)const if(format<=FORMAT_FULL || hour) { - ret+=strprintf(format<=FORMAT_NOSPACES?"%dh":"%dh ",hour); + ret+=strprintf("%dh",hour); started = true; } if(format<=FORMAT_FULL || minute) { - ret+=strprintf(format<=FORMAT_NOSPACES?"%dm":"%dm ",minute); + ret+=strprintf(format<=FORMAT_NOSPACES||!started?"%dm":" %dm",minute); started = true; } @@ -227,16 +227,16 @@ Time::get_string(float fps, Time::Format format)const frame=time*fps; if(format<=FORMAT_FULL || second) { - ret+=strprintf(format<=FORMAT_NOSPACES?"%ds":"%ds ",(int)second); + ret+=strprintf(format<=FORMAT_NOSPACES||!started?"%ds":" %ds",(int)second); started = true; } if(format<=FORMAT_FULL || frame || !started) { if(abs(frame-floor(frame)>=epsilon_())) - ret+=strprintf("%0.3ff",frame); + ret+=strprintf(format<=FORMAT_NOSPACES||!started?"%0.3ff":" %0.3ff",frame); else - ret+=strprintf("%0.0ff",frame); + ret+=strprintf(format<=FORMAT_NOSPACES||!started?"%0.0ff":" %0.0ff",frame); } } else -- 2.7.4