From 0b4a9f4650fe28e1a909bc0abe93ad48d913ce8d Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Fri, 10 Jul 2020 02:40:23 +1000 Subject: [PATCH] timeline: fixed bug that caused I-beam to render incorrectly --- app/widget/timelinewidget/view/timelineview.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/widget/timelinewidget/view/timelineview.cpp b/app/widget/timelinewidget/view/timelineview.cpp index cf253104e..b55ec6cba 100644 --- a/app/widget/timelinewidget/view/timelineview.cpp +++ b/app/widget/timelinewidget/view/timelineview.cpp @@ -250,17 +250,17 @@ void TimelineView::drawForeground(QPainter *painter, const QRectF &rect) if (show_beam_cursor_ && connected_track_list_ - && cursor_coord_.GetTrack().type() == connected_track_list_->type() - && cursor_coord_.GetTrack().index() < connected_track_list_->GetTrackCount()) { + && cursor_coord_.GetTrack().type() == connected_track_list_->type()) { painter->setPen(Qt::gray); double cursor_x = TimeToScene(cursor_coord_.GetFrame()); int track_index = cursor_coord_.GetTrack().index(); + int track_y = GetTrackY(track_index); painter->drawLine(cursor_x, - GetTrackY(track_index), + track_y, cursor_x, - GetTrackHeight(track_index)); + track_y + GetTrackHeight(track_index)); } }