Undo will now change the canvas size. Redo will now however. Using the same function (undoAndRedoSizeComparison) just prevents redo entirely. Not sure why