@Override
  public void undo() throws CannotUndoException {
    super.undo();

    if (imageEdit != null) {
      imageEdit.undo();
    }
    if (translationEdit != null) {
      translationEdit.undo();
    }
    // it is important to undo the canvas change edit
    // after the image and translation edits because
    // of the image covers canvas checks
    if (canvasChangeEdit != null) {
      canvasChangeEdit.undo();
    }
    if (selectionChangeEdit != null) {
      selectionChangeEdit.undo();
    }
    if (deselectEdit != null) {
      deselectEdit.undo();
    }

    updateGUI();
  }