timeline views can be siblings

This commit is contained in:
itsmattkc
2019-10-07 09:01:11 +11:00
parent 31f11cd87d
commit df9255ce0b
6 changed files with 39 additions and 10 deletions
+21
View File
@@ -483,3 +483,24 @@ void TimelineView::SetEndTime(const rational &length)
{
end_item_->SetEndTime(length);
}
void TimelineView::SetSiblings(TimelineView *a, TimelineView *b)
{
if (a == b)
return;
if (!a->siblings_.contains(b))
a->siblings_.append(b);
if (!b->siblings_.contains(a))
b->siblings_.append(a);
}
void TimelineView::SetSiblings(const QList<TimelineView *> &siblings)
{
foreach (TimelineView* view, siblings) {
foreach (TimelineView* sibling, siblings) {
SetSiblings(view, sibling);
}
}
}