add<T> method

void add<T>(
  1. MyChange<T> change
)

Add New Change and Clear Redo Stack

Implementation

void add<T>(MyChange<T> change) {
  change.transState = transState;
  if (transState == TransState.start) {
    transState = TransState.ing;
  }
  change.execute();
  _history.addLast(change);
  _moveForward();
}