Use get_layer_descriptions() to format the layer list rather than including a copy...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Tue, 15 Jan 2008 14:48:20 +0000 (14:48 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Tue, 15 Jan 2008 14:48:20 +0000 (14:48 +0000)
git-svn-id: http://svn.voria.com/code@1373 1f10aa63-cdf2-0310-b900-c93c546f37ac

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

index 4f08c3f..1be9549 100644 (file)
@@ -66,20 +66,7 @@ Action::LayerRemove::LayerRemove()
 synfig::String
 Action::LayerRemove::get_local_name()const
 {
-       String ret;
-
-       if (layer_list.empty())
-               return _("Remove Layer");
-
-       ret = strprintf("%s '%s'",
-                                       (layer_list.size() == 1
-                                        ? _("Remove Layer")
-                                        : _("Remove Layers")),
-                                       layer_list.begin()->first->get_non_empty_description().c_str());
-
-       for(std::list<std::pair<synfig::Layer::Handle,int> >::const_iterator iter=++layer_list.begin(); iter!=layer_list.end(); ++iter)
-               ret += strprintf(", '%s'", (iter->first->get_non_empty_description().c_str()));
-       return ret;
+       return get_layer_descriptions(layer_list, _("Remove Layer"), _("Remove Layers"));
 }
 
 Action::ParamVocab