mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Bulk card modification
This commit is contained in:
@@ -212,7 +212,34 @@ String ChangeCardHasStylingAction::getName(bool to_undo) const {
|
||||
void ChangeCardHasStylingAction::perform(bool to_undo) {
|
||||
card->has_styling = !card->has_styling;
|
||||
swap(card->styling_data, styling_data);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : Change notes
|
||||
|
||||
ChangeCardNotesAction::ChangeCardNotesAction(const CardP& card, const String& notes)
|
||||
: card(card), notes(notes)
|
||||
{}
|
||||
String ChangeCardNotesAction::getName(bool to_undo) const {
|
||||
return _("Change notes");
|
||||
}
|
||||
void ChangeCardNotesAction::perform(bool to_undo) {
|
||||
swap(card->notes, notes);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : Change uid
|
||||
|
||||
ChangeCardUIDAction::ChangeCardUIDAction(Set& set, const CardP& card, const String& uid)
|
||||
: CardListAction(set), card(card), uid(uid)
|
||||
{}
|
||||
String ChangeCardUIDAction::getName(bool to_undo) const {
|
||||
return _("Change ID");
|
||||
}
|
||||
void ChangeCardUIDAction::perform(bool to_undo) {
|
||||
FOR_EACH(c, set.cards) {
|
||||
c->updateLink(card->uid, uid);
|
||||
}
|
||||
swap(card->uid, uid);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : Pack types
|
||||
|
||||
|
||||
Reference in New Issue
Block a user