X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fsynfigapp%2Factions%2Flayermove.cpp;h=be220a580fdb075f8d74c95f75919f8dd9d08ac6;hb=334e15ce6c4d9b1f30a168a55e7ef4d31320d568;hp=3c0fdf4ed34cfeb8afab67af0c96376ba208ff89;hpb=8ef042c40521681cea99944097c4f90a5ac6cf74;p=synfig.git diff --git a/synfig-studio/trunk/src/synfigapp/actions/layermove.cpp b/synfig-studio/trunk/src/synfigapp/actions/layermove.cpp index 3c0fdf4..be220a5 100644 --- a/synfig-studio/trunk/src/synfigapp/actions/layermove.cpp +++ b/synfig-studio/trunk/src/synfigapp/actions/layermove.cpp @@ -44,7 +44,7 @@ using namespace Action; /* === M A C R O S ========================================================= */ -ACTION_INIT(Action::LayerMove); +ACTION_INIT_NO_GET_LOCAL_NAME(Action::LayerMove); ACTION_SET_NAME(Action::LayerMove,"layer_move"); ACTION_SET_LOCAL_NAME(Action::LayerMove,N_("Move Layer")); ACTION_SET_TASK(Action::LayerMove,"move"); @@ -66,6 +66,15 @@ Action::LayerMove::LayerMove(): { } +synfig::String +Action::LayerMove::get_local_name()const +{ + if (layer) + return strprintf("%s '%s'", _("Move Layer"), layer->get_non_empty_description().c_str()); + else + return _("Move Layer"); +} + Action::ParamVocab Action::LayerMove::get_param_vocab() { @@ -127,7 +136,7 @@ Action::LayerMove::set_param(const synfig::String& name, const Action::Param &pa bool Action::LayerMove::is_ready()const { - synfig::info(__FILE__":%d: layer->count()=%d",__LINE__,layer.count()); + // synfig::info(__FILE__":%d: layer->count()=%d",__LINE__,layer.count()); if(!layer || (unsigned)new_index==0xdeadbeef) return false; return Action::CanvasSpecific::is_ready(); @@ -136,7 +145,7 @@ Action::LayerMove::is_ready()const void Action::LayerMove::perform() { - synfig::info(__FILE__":%d: layer->count()=%d",__LINE__,layer.count()); + // synfig::info(__FILE__":%d: layer->count()=%d",__LINE__,layer.count()); Canvas::Handle subcanvas(layer->get_canvas()); src_canvas=subcanvas; @@ -150,7 +159,7 @@ Action::LayerMove::perform() if(*iter!=layer) throw Error(_("This layer doesn't exist anymore.")); - synfig::info(__FILE__":%d: layer->count()=%d",__LINE__,layer.count()); + // synfig::info(__FILE__":%d: layer->count()=%d",__LINE__,layer.count()); // If the subcanvas isn't the same as the canvas, // then it had better be an inline canvas. If not, @@ -169,7 +178,7 @@ Action::LayerMove::perform() set_dirty(layer->active()); - synfig::info(__FILE__":%d: layer->count()=%d",__LINE__,layer.count()); + // synfig::info(__FILE__":%d: layer->count()=%d",__LINE__,layer.count()); // If we were to move it to where it is if(old_index==depth && src_canvas==dest_canvas) @@ -188,7 +197,7 @@ Action::LayerMove::perform() layer->changed(); dest_canvas->changed(); if(dest_canvas!=src_canvas) src_canvas->changed(); - synfig::info(__FILE__":%d: layer->count()=%d",__LINE__,layer.count()); + // synfig::info(__FILE__":%d: layer->count()=%d",__LINE__,layer.count()); if(get_canvas_interface()) { @@ -210,7 +219,7 @@ Action::LayerMove::perform() } else synfig::warning("CanvasInterface not set on action"); - synfig::info(__FILE__":%d: layer->count()=%d",__LINE__,layer.count()); + // synfig::info(__FILE__":%d: layer->count()=%d",__LINE__,layer.count()); } void