From: dooglus Date: Tue, 15 Jan 2008 14:47:48 +0000 (+0000) Subject: Improved the formatting of ValueDesc descriptions for use in the History dialog. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=59771c7728f36f94f9e6d3470ac0987acaff879d;p=synfig.git Improved the formatting of ValueDesc descriptions for use in the History dialog. git-svn-id: http://svn.voria.com/code@1370 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/src/synfigapp/value_desc.cpp b/synfig-studio/trunk/src/synfigapp/value_desc.cpp index 425f25b..b27e81b 100644 --- a/synfig-studio/trunk/src/synfigapp/value_desc.cpp +++ b/synfig-studio/trunk/src/synfigapp/value_desc.cpp @@ -57,26 +57,16 @@ ValueDesc::get_description(bool show_exported_name)const if (parent_is_layer_param()) { - description = strprintf("'%s' -> %s", // layer -> parameter - get_layer()->get_non_empty_description().c_str(), - get_param_name().c_str()); + description = strprintf("(%s):%s", // (layer):parameter + get_layer()->get_non_empty_description().c_str(), + get_layer()->get_param_local_name(get_param_name()).c_str()); if (show_exported_name) description += strprintf(" (%s)", get_value_node()->get_id().c_str()); } else if (parent_is_value_node()) { synfig::LinkableValueNode::Handle value_node(synfig::LinkableValueNode::Handle::cast_reinterpret(get_parent_value_node())); - synfig::Node* node; - for(node=value_node.get();!node->parent_set.empty() && !dynamic_cast(node);node=*node->parent_set.begin()); - Layer::Handle parent_layer(dynamic_cast(node)); - if(parent_layer) - description = strprintf("'%s' => %s", // layer -> sub-parameter - parent_layer->get_non_empty_description().c_str(), - value_node->link_local_name(get_index()).c_str()); - else - description = value_node->link_local_name(get_index()); // sub-parameter - if (show_exported_name) - description += strprintf(" (%s)", get_value_node()->get_id().c_str()); + return value_node->get_description(get_index(), show_exported_name); } else if (show_exported_name) description = strprintf(_("ValueNode (%s)"), get_value_node()->get_id().c_str());