From 818ef12383320c153e39d35ab75f289c60e59327 Mon Sep 17 00:00:00 2001 From: dooglus Date: Tue, 5 Feb 2008 11:40:19 +0000 Subject: [PATCH] Improve LinkableValueNode::get_description(). git-svn-id: http://svn.voria.com/code@1590 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/synfig/valuenode.cpp | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) 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; } -- 2.7.4