%% delete_Cell
%    deletes the last cell in the grid, also deletes an associated
%    new grid push button,
%    TODO, need to implement the case where last cell is deleted.
% inputs:
%   object:Grid - current Grid object
% outputs
%   none
% Author: Colin Eles elesc@mcmaster.ca
% Organization: McMaster Centre for Software Certification
function [] = delete_Cell(object)


last_cell = object.num_cells;
object.rGrid.delete_g2s(object.cells(end));
object.cells(end).cond = [];
object.cells(end).grid_pb = [];
object.cells(end) = [];
if(~isempty(object.rGrid))
    object.rGrid.refresh;
end
end

