projects
/
synfig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e66504a
)
Avoid negative precision to produce good strings always and add U+00B0 DEGREE SIGN
author
Carlos Lopez
<genetita@gmail.com>
Thu, 16 Dec 2010 20:58:07 +0000
(21:58 +0100)
committer
Carlos Lopez
<genetita@gmail.com>
Thu, 16 Dec 2010 20:58:07 +0000
(21:58 +0100)
synfig-core/src/synfig/valuenode_anglestring.cpp
patch
|
blob
|
history
diff --git
a/synfig-core/src/synfig/valuenode_anglestring.cpp
b/synfig-core/src/synfig/valuenode_anglestring.cpp
index
99b51ef
..
b64a42f
100644
(file)
--- 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;
}