added 'undone' parameter to onAction

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@43 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-10-20 14:24:36 +00:00
parent 44b516036d
commit 20f0efacd7
17 changed files with 93 additions and 55 deletions
+3 -5
View File
@@ -39,12 +39,10 @@ void AddCardAction::perform(bool to_undo) {
RemoveCardAction::RemoveCardAction(Set& set, const CardP& card)
: CardListAction(set), card(card)
{
// find the card_id of the card we want to remove
vector<CardP>::iterator it = find(set.cards.begin(), set.cards.end(), card);
if (it != set.cards.end()) {
card_id = it - set.cards.begin();
} else {
, card_id(find(set.cards.begin(), set.cards.end(), card) - set.cards.begin())
{
if (card_id >= set.cards.size()) {
throw InternalError(_("Card to remove not found in set"));
}
}