From 8cf9327936c308c7b6a25b595497c23148c384b0 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Mon, 9 Mar 2020 16:57:51 +1100 Subject: [PATCH] timelineviewblockitem: fixed issue that caused waveforms to always appear at the start of the timeline --- .../timelinewidget/view/timelineviewblockitem.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/widget/timelinewidget/view/timelineviewblockitem.cpp b/app/widget/timelinewidget/view/timelineviewblockitem.cpp index 399f82186..7b012a583 100644 --- a/app/widget/timelinewidget/view/timelineviewblockitem.cpp +++ b/app/widget/timelinewidget/view/timelineviewblockitem.cpp @@ -124,12 +124,14 @@ void TimelineViewBlockItem::paint(QPainter *painter, const QStyleOptionGraphicsI summary_index = sample_index; } - for (int j=0;jdrawLine(i, + for (int j=0;jdrawLine(line_x, channel_mid + clamp(qRound(summary.at(j).min * channel_half_height), -channel_half_height, channel_half_height), - i, + line_x, channel_mid + clamp(qRound(summary.at(j).max * channel_half_height), -channel_half_height, channel_half_height)); } }