Module: synfig/synfig
Branch: master
Commit: 72fee47109d8d1f6e4c5043ab60200e61357636a
URL:    
http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig/synfig;a=commit;h=72fee47109d8d1f6e4c5043ab60200e61357636a

Author: Carlos Lopez <[email protected]>
Date:   Thu Dec 16 21:58:07 2010 +0100

Avoid negative precision to produce good strings always and add U+00B0 DEGREE 
SIGN

---

 synfig-core/src/synfig/valuenode_anglestring.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

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;
        }


------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to