Correct tab is selected on undo/redo

Last item undone or redone tabs to correct table. Tooltip bug fixed,
Undo button was showing tooltips for redo. Undo/redo works for editing,
replace, add row/column, and sort. Does not work for table copy
operations.