Fix ValueDesc::get_description() to work with const valuenodes.
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Tue, 25 Nov 2008 01:20:41 +0000 (01:20 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Tue, 25 Nov 2008 01:20:41 +0000 (01:20 +0000)
git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2263 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/synfigapp/value_desc.cpp

index a8a4d5c..ef0cffb 100644 (file)
@@ -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__);