%% pb_call
%    callback function for the new subgrid button
% inputs:
%   object:Cell - Current Cell Object
%   src:double - Source of the callback
%   event:eventdata - Data of the eventcall
% outputs;
%   none
% Author: Colin Eles elesc@mcmaster.ca
% Organization: McMaster Centre for Software Certification
function [] = pb_call(object,src,event)
gui = get(src,'userdata');




object.new_Grid;
gui.reset_wh();
%gui.draw_grid2(gui.Grid2);
gui.draw_allgrids(0);

if isempty(event) || event ~= 1
    
    undo_data.action = 4;
    undo_data.grid = object.subgrid;
    undo_data.cell = object;
    undo_data.text = [];
    undo_data.subgrid = [];
    
    gui.undo_man.new_state(undo_data);
end

gui.update_undoredo;


end

