From: dooglus Date: Tue, 5 Feb 2008 11:40:19 +0000 (+0000) Subject: Improve LinkableValueNode::get_description(). X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=818ef12383320c153e39d35ab75f289c60e59327;p=synfig.git Improve LinkableValueNode::get_description(). git-svn-id: http://svn.voria.com/code@1590 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/synfig/valuenode.cpp b/synfig-core/trunk/src/synfig/valuenode.cpp index af1fb0d..44a1b43 100644 --- a/synfig-core/trunk/src/synfig/valuenode.cpp +++ b/synfig-core/trunk/src/synfig/valuenode.cpp @@ -582,12 +582,23 @@ LinkableValueNode::get_description(int index, bool show_exported_name)const { String description; - if (show_exported_name && !is_exported()) - show_exported_name = false; - - if (index != -1) + if (index == -1) + { + if (show_exported_name && is_exported()) + description += strprintf(" (%s)", get_id().c_str()); + } + else + { description = String(":") + link_local_name(index); + if (show_exported_name) + { + ValueNode::LooseHandle link(get_link(index)); + if (link->is_exported()) + description += strprintf(" (%s)", link->get_id().c_str()); + } + } + const synfig::Node* node = this; LinkableValueNode::ConstHandle parent_linkable_vn = 0; @@ -627,8 +638,5 @@ LinkableValueNode::get_description(int index, bool show_exported_name)const description.c_str()); } - if (show_exported_name) - description += strprintf(" (%s)", get_id().c_str()); - return description; }