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:47:57 +0000 (14:47 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Tue, 15 Jan 2008 14:47:57 +0000 (14:47 +0000)
git-svn-id: http://svn.voria.com/code@1371 1f10aa63-cdf2-0310-b900-c93c546f37ac

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

index c8aba73..e1f6988 100644 (file)
@@ -67,20 +67,7 @@ Action::LayerRaise::LayerRaise()
 synfig::String
 Action::LayerRaise::get_local_name()const
 {
-       String ret;
-
-       if (layers.empty())
-               return _("Raise Layer");
-
-       ret = strprintf("%s '%s'",
-                                       (layers.size() == 1
-                                        ? _("Raise Layer")
-                                        : _("Raise Layers")),
-                                       (*layers.begin())->get_non_empty_description().c_str());
-
-       for(std::list<synfig::Layer::Handle>::const_iterator iter=++layers.begin(); iter!=layers.end(); ++iter)
-               ret += strprintf(", '%s'", ((*iter)->get_non_empty_description().c_str()));
-       return ret;
+       return get_layer_descriptions(layers, _("Raise Layer"), _("Raise Layers"));
 }
 
 Action::ParamVocab