Make undoManager clearUndoHistory method clear the redo history as well. Rename method to clearHistory().