Improve the description of a ValueNode to include its exported name if requested...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sun, 3 Feb 2008 19:22:07 +0000 (19:22 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sun, 3 Feb 2008 19:22:07 +0000 (19:22 +0000)
git-svn-id: http://svn.voria.com/code@1566 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/synfig/valuenode.cpp

index 51cd1ff..af1fb0d 100644 (file)
@@ -314,10 +314,18 @@ ValueNode::set_id(const String &x)
 String
 ValueNode::get_description(bool show_exported_name)const
 {
+       String ret(_("ValueNode"));
+
        if (dynamic_cast<const LinkableValueNode*>(this))
                return (dynamic_cast<const LinkableValueNode*>(this))->get_description(-1, show_exported_name);
 
-       return "ValueNode";
+       if (show_exported_name && !is_exported())
+               show_exported_name = false;
+
+       if (show_exported_name)
+               ret += strprintf(" (%s)", get_id().c_str());
+
+       return ret;
 }
 
 ValueNodeList::ValueNodeList():