function Status = undo(LoopData)
%UNDO  Manages SISO Tool Undo.

%   Author(s): P. Gahinet
%   Copyright 1986-2000 The MathWorks, Inc. 
%   $Revision: 1.4 $  $Date: 2000/06/14 20:18:29 $

% Get last transaction
LastT = LoopData.Undo(end);

% Remove it from Undo stack
LoopData.Undo = LoopData.Undo(1:end-1);

% Add it to redo stack
LoopData.Redo = [LoopData.Redo ; LastT];
    
% Undo it
undo(LastT);

% Trigger LoopDataChanged event (global update)
dataevent(LoopData,'all');

% Return status
Status = sprintf('Undoing %s.',LastT.Name);

