projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update SVN_REPOSITORY variable to the new svn in sourceforge
[synfig.git]
/
synfig-studio
/
trunk
/
src
/
synfigapp
/
actions
/
groupremovelayers.cpp
diff --git
a/synfig-studio/trunk/src/synfigapp/actions/groupremovelayers.cpp
b/synfig-studio/trunk/src/synfigapp/actions/groupremovelayers.cpp
index
11bbe18
..
b3583f3
100644
(file)
--- a/
synfig-studio/trunk/src/synfigapp/actions/groupremovelayers.cpp
+++ b/
synfig-studio/trunk/src/synfigapp/actions/groupremovelayers.cpp
@@
-6,6
+6,7
@@
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2007 Chris Moore
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
@@
-70,16
+71,10
@@
Action::GroupRemoveLayers::get_param_vocab()
ret.push_back(ParamDesc("layer",Param::TYPE_LAYER)
.set_local_name(_("Layer"))
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()
);
.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;
}
return ret;
}
@@
-101,20
+96,13
@@
Action::GroupRemoveLayers::set_param(const synfig::String& name, const Action::P
return true;
}
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
{
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();
}
return false;
return Action::CanvasSpecific::is_ready();
}
@@
-126,9
+114,7
@@
Action::GroupRemoveLayers::perform()
for(iter=layer_list.begin();iter!=layer_list.end();++iter)
{
Layer::Handle layer(iter->first);
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());
}
}
}
}