Skip to content

Commit

Permalink
extracted EditCommand.applyUndoRedo
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzoBettini committed Nov 17, 2023
1 parent 6a8f2b1 commit 48bdb57
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -52,13 +52,15 @@ public void doExecute() {

@Override
public void doUndo() {
EObjectState tempState = new EObjectState(original);
state.copyStateTo(original);
state = tempState;
applyUndoRedo();
}

@Override
public void doRedo() {
applyUndoRedo();
}

private void applyUndoRedo() {
EObjectState tempState = new EObjectState(original);
state.copyStateTo(original);
state = tempState;
Expand Down

0 comments on commit 48bdb57

Please sign in to comment.