timebasedviews: only drag playhead when there's no item underneath the cursor

This commit is contained in:
itsmattkc
2021-01-24 09:36:05 +11:00
parent 62bab2ec01
commit eb132d93de
4 changed files with 32 additions and 19 deletions
+1 -11
View File
@@ -1441,17 +1441,7 @@ void TimelineWidget::SetSelections(const TimelineWidgetSelections &s)
Block *TimelineWidget::GetItemAtScenePos(const TimelineCoordinate& coord)
{
Track* track = GetTrackFromReference(coord.GetTrack());
foreach (Block* b, added_blocks_) {
if (b->in() <= coord.GetFrame()
&& b->out() > coord.GetFrame()
&& b->track() == track) {
return b;
}
}
return nullptr;
return views_.at(coord.GetTrack().type())->view()->GetItemAtScenePos(coord.GetFrame(), coord.GetTrack().index());
}
struct SnapData {