Fixed bug in measure branch height

This commit is contained in:
Joel Holdsworth 2009-01-24 14:16:33 +00:00
parent 523eecfc24
commit 7a066cdd72

View file

@ -274,18 +274,21 @@ TimelineLayoutHelper::measure_branch_height(
int branch_height = parent_track->get_height() + int branch_height = parent_track->get_height() +
TimelineWidget::TrackPadding; TimelineWidget::TrackPadding;
TrackTree::sibling_iterator iterator; // Add the heights of child tracks if this parent is expanded
for(iterator = layoutTree.begin(parent_iterator); if(parent_track->get_expanded())
iterator != layoutTree.end(parent_iterator); {
iterator++) TrackTree::sibling_iterator iterator;
{ for(iterator = layoutTree.begin(parent_iterator);
shared_ptr<timeline::Track> child_track = iterator != layoutTree.end(parent_iterator);
lookup_timeline_track(*iterator); iterator++)
{
if(child_track->get_expanded()) shared_ptr<timeline::Track> child_track =
branch_height += measure_branch_height(iterator); lookup_timeline_track(*iterator);
branch_height += measure_branch_height(iterator);
}
} }
return branch_height; return branch_height;
} }