don't automatically create gaps if one already exists that can be resized

Rather than constantly create gaps, we can more intelligently determine whether
a gap can be extended to take the place of a block being removed, etc.
This commit is contained in:
itsmattkc
2019-12-14 00:44:41 +11:00
parent 323718bc11
commit bc5e7349ef
4 changed files with 77 additions and 21 deletions
@@ -184,6 +184,14 @@ void TimelineViewGhostItem::SetMode(const olive::timeline::MovementMode &mode)
mode_ = mode;
}
bool TimelineViewGhostItem::HasBeenAdjusted() const
{
return InAdjustment() != 0
|| OutAdjustment() != 0
|| MediaInAdjustment() != 0
|| TrackAdjustment() != 0;
}
void TimelineViewGhostItem::UpdateRect()
{
rational length = GetAdjustedOut() - GetAdjustedIn();