From 82140c53ab82809987a3206f4691062582f6c04c Mon Sep 17 00:00:00 2001 From: dooglus Date: Sun, 3 Feb 2008 19:22:07 +0000 Subject: [PATCH] Improve the description of a ValueNode to include its exported name if requested to do so. git-svn-id: http://svn.voria.com/code@1566 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/synfig/valuenode.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/synfig-core/trunk/src/synfig/valuenode.cpp b/synfig-core/trunk/src/synfig/valuenode.cpp index 51cd1ff..af1fb0d 100644 --- a/synfig-core/trunk/src/synfig/valuenode.cpp +++ b/synfig-core/trunk/src/synfig/valuenode.cpp @@ -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(this)) return (dynamic_cast(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(): -- 2.7.4