When editing an exported valuenode, show the name it is exported as in the History...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sun, 13 Jan 2008 10:38:07 +0000 (10:38 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sun, 13 Jan 2008 10:38:07 +0000 (10:38 +0000)
git-svn-id: http://svn.voria.com/code@1340 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/synfigapp/actions/valuedescset.cpp

index a7ca4cf..85e1fce 100644 (file)
@@ -83,9 +83,13 @@ Action::ValueDescSet::get_local_name()const
        {
        }
        else if(value_desc.parent_is_layer_param())
-               name = strprintf(_("'%s' -> %s"),
+       {
+               name = strprintf("'%s' -> %s", // layer -> parameter
                                                 value_desc.get_layer()->get_non_empty_description().c_str(),
                                                 value_desc.get_param_name().c_str());
+               if (value_desc.is_exported())
+                       name += strprintf(" (%s)", value_desc.get_value_node()->get_id().c_str());
+       }
        else if(value_desc.parent_is_value_node())
        {
                synfig::LinkableValueNode::Handle value_node(synfig::LinkableValueNode::Handle::cast_reinterpret(value_desc.get_parent_value_node()));
@@ -93,12 +97,16 @@ Action::ValueDescSet::get_local_name()const
                for(node=value_node.get();!node->parent_set.empty() && !dynamic_cast<Layer*>(node);node=*node->parent_set.begin());
                Layer::Handle parent_layer(dynamic_cast<Layer*>(node));
                if(parent_layer)
-                       name = strprintf(_("'%s' => %s"),
+                       name = strprintf("'%s' => %s", // layer -> sub-parameter
                                                         parent_layer->get_non_empty_description().c_str(),
                                                         value_node->link_local_name(value_desc.get_index()).c_str());
                else
-                       name = value_node->link_local_name(value_desc.get_index());
+                       name = value_node->link_local_name(value_desc.get_index()); // sub-parameter
+               if (value_desc.is_exported())
+                       name += strprintf(" (%s)", value_desc.get_value_node()->get_id().c_str());
        }
+       else if (value_desc.is_exported())
+               name = strprintf(_("ValueNode (%s)"), value_desc.get_value_node()->get_id().c_str());
 
        return strprintf(_("Set %s"), name.c_str());
 }