%% search_replace
%    looks through the queue for action number 1s and cells equal to an
%    input and replaces the cell with a new value. Used when undoing a
%    delete, so that text editing can still be undone on the newly created
%    textbox;
% inputs:
%   object - current UndoManager
%   action:int - action to look for
%   prev:float - textbox handle
%   new:float - textbox handle
% outputs:
%   none
% Author: Colin Eles elesc@mcmaster.ca
% Organization: McMaster Centre for Software Certification
function [ ] = search_replace( object, action, prev, new )

switch action
    case 1
        for i=1:size(object.queue,2)
            if (object.queue(i).action == 1)
                if(object.queue(i).cell == prev)
                    object.queue(i).cell = new;
                end
                
            end
        end
end

end

