mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 21:06:59 -04:00
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:
@@ -186,11 +186,11 @@ void CardsPanel::onCommand(int id) {
|
||||
|
||||
// ----------------------------------------------------------------------------- : Actions
|
||||
|
||||
bool CardsPanel::wantsToHandle(const Action&) const {
|
||||
bool CardsPanel::wantsToHandle(const Action&, bool undone) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
void CardsPanel::onAction(const Action& action) {
|
||||
void CardsPanel::onAction(const Action& action, bool undo) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
|
||||
@@ -34,8 +34,8 @@ class CardsPanel : public SetWindowPanel {
|
||||
|
||||
// --------------------------------------------------- : Actions
|
||||
|
||||
virtual bool wantsToHandle(const Action&) const;
|
||||
virtual void onAction(const Action&);
|
||||
virtual bool wantsToHandle(const Action&, bool undone) const;
|
||||
virtual void onAction(const Action&, bool undone);
|
||||
virtual void onRenderSettingsChange();
|
||||
private:
|
||||
void updateSize();
|
||||
|
||||
@@ -46,9 +46,9 @@ class SetWindowPanel : public wxPanel, public SetView {
|
||||
// --------------------------------------------------- : Actions/Events
|
||||
|
||||
/// Should return true if this panel wants to get focus to show an action
|
||||
virtual bool wantsToHandle(const Action&) const { return false; }
|
||||
virtual bool wantsToHandle(const Action&, bool undone) const { return false; }
|
||||
/// Handle an action that changes the current set
|
||||
virtual void onAction(const Action&) {}
|
||||
virtual void onAction(const Action&, bool undone) {}
|
||||
/// The settings for rendering cards have changed, refresh card viewers/editors
|
||||
virtual void onRenderSettingsChange() {}
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@ void SetWindow::onChangeSet() {
|
||||
fixMinWindowSize();
|
||||
}
|
||||
|
||||
void SetWindow::onAction(const Action& action) {
|
||||
void SetWindow::onAction(const Action& action, bool undone) {
|
||||
// TYPE_CASE_(action, SetStyleChange) {
|
||||
// // The style changed, maybe also the size of the viewer
|
||||
// Layout();
|
||||
|
||||
@@ -80,7 +80,7 @@ class SetWindow : public wxFrame, public SetView {
|
||||
/// We want to respond to set changes
|
||||
virtual void onChangeSet();
|
||||
/// Actions that change the set
|
||||
virtual void onAction(const Action&);
|
||||
virtual void onAction(const Action&, bool undone);
|
||||
|
||||
private:
|
||||
/// A different card has been selected
|
||||
|
||||
Reference in New Issue
Block a user