From b8b7bf129a4d7218e570102ee3c5cd7e584f0bcb Mon Sep 17 00:00:00 2001 From: dooglus Date: Tue, 25 Nov 2008 01:20:41 +0000 Subject: [PATCH] Fix ValueDesc::get_description() to work with const valuenodes. git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2263 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/src/synfigapp/value_desc.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/synfig-studio/trunk/src/synfigapp/value_desc.cpp b/synfig-studio/trunk/src/synfigapp/value_desc.cpp index a8a4d5c..ef0cffb 100644 --- a/synfig-studio/trunk/src/synfigapp/value_desc.cpp +++ b/synfig-studio/trunk/src/synfigapp/value_desc.cpp @@ -68,9 +68,15 @@ ValueDesc::get_description(bool show_exported_name)const if (parent_is_linkable_value_node()) { synfig::LinkableValueNode::Handle value_node(synfig::LinkableValueNode::Handle::cast_reinterpret(get_parent_value_node())); - description = strprintf("%s %s", _("Value Node"), + description = strprintf("%s %s", _("ValueNode"), value_node->get_description(get_index(), show_exported_name).c_str()); } + else if (parent_is_value_node_const()) + { + synfig::ValueNode_Const::Handle value_node(synfig::ValueNode_Const::Handle::cast_reinterpret(get_parent_value_node())); + description = strprintf("%s %s", _("Const ValueNode"), + value_node->get_description(show_exported_name).c_str()); + } else { warning("%s:%d didn't expect to get here", __FILE__, __LINE__); -- 2.7.4