UndoRedo._do: use UndoRedo.RE/UN constants in if statements.