%% set_heights
%    sets the heights for each of the cells and subcells of a grid,
%    uses the cells cal_height method to determine what the heights
%    should be.
% inputs:
%   object:Grid - current Grid object
%   edit:boolean - current value of the edit toggle.
% outputs:
%   none
% Author: Colin Eles elesc@mcmaster.ca
% Organization: McMaster Centre for Software Certification
function [] = set_heights(object,edit)
for i = 1:size(object.cells,2)
    if (~isempty(object.cells(i).subgrid))
        object.cells(i).subgrid.set_heights(edit);
    end
    object.cells(i).height = object.cells(i).cal_height(edit);
end

end

