Allow multiple cards to be selected in a card list,

Allow card actions to add/remove multiple cards.
not yet: actually use these multicard actions.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@853 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-05-17 01:51:50 +00:00
parent 1b516e781f
commit c666e98645
14 changed files with 145 additions and 149 deletions
+9 -4
View File
@@ -190,10 +190,15 @@ void SetScriptManager::onAction(const Action& action, bool undone) {
return; // Don't go into an infinite loop because of our own events
}
TYPE_CASE(action, AddCardAction) {
// update the added card specificly
Context& ctx = getContext(action.card);
FOR_EACH(v, action.card->data) {
v->update(ctx);
if (action.action.adding != undone) {
// update the added cards specificly
FOR_EACH_CONST(step, action.action.steps) {
const CardP& card = step.item;
Context& ctx = getContext(card);
FOR_EACH(v, card->data) {
v->update(ctx);
}
}
}
// note: fallthrough
}