mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Changed so you can't delete last card in set.
(this can cause crashes, and an empty set seems pointless anyways.) git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@403 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -199,7 +199,8 @@ void CardsPanel::onCommand(int id) {
|
||||
set->actions.add(new AddCardAction(*set));
|
||||
break;
|
||||
case ID_CARD_REMOVE:
|
||||
if (card_list->getCard() != nullptr)
|
||||
if (card_list->getCard() != nullptr && set->cards.size() != 1)
|
||||
//Don't delete the last card, and certainly don't delete a card if none exists.
|
||||
set->actions.add(new RemoveCardAction(*set, card_list->getCard()));
|
||||
break;
|
||||
case ID_CARD_ROTATE:
|
||||
|
||||
Reference in New Issue
Block a user