mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Reduce coupling between ValueEditors/Viewers and Set and StyleSheet.
- Adding of actions is done with an addAction function
- Files are read from
- getStylePackage for styling stuff (this is stylesheet)
- getLocalPackage for symbol and image values (this was the set)
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@970 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -162,7 +162,7 @@ bool CardListBase::doPaste() {
|
||||
ok = data.getCards(set, new_cards);
|
||||
if (!ok) return false;
|
||||
// add card to set
|
||||
set->actions.add(new AddCardAction(ADD, *set, new_cards));
|
||||
set->actions.addAction(new AddCardAction(ADD, *set, new_cards));
|
||||
return true;
|
||||
}
|
||||
bool CardListBase::doDelete() {
|
||||
@@ -176,7 +176,7 @@ bool CardListBase::doDelete() {
|
||||
}
|
||||
if (cards_to_delete.empty()) return false;
|
||||
// delete cards
|
||||
set->actions.add(new AddCardAction(REMOVE, *set, cards_to_delete));
|
||||
set->actions.addAction(new AddCardAction(REMOVE, *set, cards_to_delete));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -345,7 +345,7 @@ void CardListBase::onDrag(wxMouseEvent& ev) {
|
||||
findSelectedItemPos();
|
||||
if (item != selected_item_pos) {
|
||||
// move card in the set
|
||||
set->actions.add(new ReorderCardsAction(*set, item, selected_item_pos));
|
||||
set->actions.addAction(new ReorderCardsAction(*set, item, selected_item_pos));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user