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