Further tidied and simplified update_headers
This commit is contained in:
parent
c9420126f1
commit
baa88abad0
1 changed files with 3 additions and 8 deletions
|
|
@ -79,17 +79,12 @@ TimelineHeaderContainer::update_headers()
|
||||||
pair<shared_ptr<model::Track>, shared_ptr<timeline::Track> > pair;
|
pair<shared_ptr<model::Track>, shared_ptr<timeline::Track> > pair;
|
||||||
BOOST_FOREACH( pair, timelineWidget.trackMap )
|
BOOST_FOREACH( pair, timelineWidget.trackMap )
|
||||||
{
|
{
|
||||||
REQUIRE(pair.first);
|
REQUIRE(pair.second);
|
||||||
|
Widget &widget = pair.second->get_header_widget();
|
||||||
Widget &widget = lookup_timeline_track(pair.first)->
|
if(widget.get_parent() == NULL) // Is the header unparented?
|
||||||
get_header_widget();
|
|
||||||
|
|
||||||
const Container *parent = widget.get_parent();
|
|
||||||
if(parent == NULL) // Is the header unparented?
|
|
||||||
widget.set_parent(*this);
|
widget.set_parent(*this);
|
||||||
ENSURE(widget.get_parent() == this);
|
ENSURE(widget.get_parent() == this);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue