From: Carlos Lopez Date: Thu, 16 Dec 2010 20:58:07 +0000 (+0100) Subject: Avoid negative precision to produce good strings always and add U+00B0 DEGREE SIGN X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=72fee47109d8d1f6e4c5043ab60200e61357636a;p=synfig.git Avoid negative precision to produce good strings always and add U+00B0 DEGREE SIGN --- diff --git a/synfig-core/src/synfig/valuenode_anglestring.cpp b/synfig-core/src/synfig/valuenode_anglestring.cpp index 99b51ef..b64a42f 100644 --- a/synfig-core/src/synfig/valuenode_anglestring.cpp +++ b/synfig-core/src/synfig/valuenode_anglestring.cpp @@ -95,13 +95,14 @@ ValueNode_AngleString::operator()(Time t)const int precision((*precision_)(t).get(int())); int zero_pad((*zero_pad_)(t).get(bool())); + if(precision<0) precision=0; switch (get_type()) { case ValueBase::TYPE_STRING: return strprintf(strprintf("%%%s%d.%df", zero_pad ? "0" : "", width, - precision).c_str(), angle); + precision).c_str(), angle)+"°"; default: break; }