From c30e8f8a8dfc5eefc852c30d24454ca167960d3b Mon Sep 17 00:00:00 2001 From: dooglus Date: Thu, 20 Dec 2007 17:03:41 +0000 Subject: [PATCH] Allow layers to be removed from groups without the user having to type the name of the group they are in. git-svn-id: http://svn.voria.com/code@1223 1f10aa63-cdf2-0310-b900-c93c546f37ac --- .../src/synfigapp/actions/groupremovelayers.cpp | 21 +++------------------ .../trunk/src/synfigapp/actions/groupremovelayers.h | 3 --- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/synfig-studio/trunk/src/synfigapp/actions/groupremovelayers.cpp b/synfig-studio/trunk/src/synfigapp/actions/groupremovelayers.cpp index 11bbe18..acec54e 100644 --- a/synfig-studio/trunk/src/synfigapp/actions/groupremovelayers.cpp +++ b/synfig-studio/trunk/src/synfigapp/actions/groupremovelayers.cpp @@ -70,16 +70,10 @@ Action::GroupRemoveLayers::get_param_vocab() ret.push_back(ParamDesc("layer",Param::TYPE_LAYER) .set_local_name(_("Layer")) - .set_desc(_("Layer to be added to group")) + .set_desc(_("Layer to be removed from group")) .set_supports_multiple() ); - ret.push_back(ParamDesc("group",Param::TYPE_STRING) - .set_local_name(_("Group")) - .set_desc(_("Name of the Group to add the Layers to")) - .set_user_supplied() - ); - return ret; } @@ -101,20 +95,13 @@ Action::GroupRemoveLayers::set_param(const synfig::String& name, const Action::P return true; } - if(name=="group" && param.get_type()==Param::TYPE_STRING) - { - group=param.get_string(); - - return true; - } - return Action::CanvasSpecific::set_param(name,param); } bool Action::GroupRemoveLayers::is_ready()const { - if(layer_list.empty() || group.empty()) + if(layer_list.empty()) return false; return Action::CanvasSpecific::is_ready(); } @@ -126,9 +113,7 @@ Action::GroupRemoveLayers::perform() for(iter=layer_list.begin();iter!=layer_list.end();++iter) { Layer::Handle layer(iter->first); - iter->second=layer->get_group(); - - layer->remove_from_group(group); + layer->remove_from_group(iter->second=layer->get_group()); } } diff --git a/synfig-studio/trunk/src/synfigapp/actions/groupremovelayers.h b/synfig-studio/trunk/src/synfigapp/actions/groupremovelayers.h index c20369d..fe7265c 100644 --- a/synfig-studio/trunk/src/synfigapp/actions/groupremovelayers.h +++ b/synfig-studio/trunk/src/synfigapp/actions/groupremovelayers.h @@ -52,9 +52,6 @@ private: // List contains the layers and their previous groups std::list > layer_list; - // The name of the new group - synfig::String group; - public: GroupRemoveLayers(); -- 2.7.4