function dummy = register(LoopData,Transaction)
%REGISTER  Logs transaction into Undo stack.

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

% REVISIT
dummy = [];

% Defaults 
% REVISIT: Add to sisoprefs
UndoStackDepth = 20;

% Commit transaction
commit(Transaction);

% Clear Redo stack
if length(LoopData.Redo)
    delete(LoopData.Redo);
    LoopData.Redo = [];
end
    
% Add transaction to bottom of Undo stack
UndoStack = [LoopData.Undo;Transaction];

% Truncate Undo stack
if length(UndoStack)>UndoStackDepth
    delete(UndoStack(1));
    UndoStack = UndoStack(2:end,:);
end

% Update property (will trigger menu label update)
LoopData.Undo = UndoStack;
