Undo redo button disable enable appropriately