Remove double-undo when exiting drawLine mode