timelineviewblockitem: fixed issue that caused waveforms to always appear at

the start of the timeline
This commit is contained in:
itsmattkc
2020-03-09 16:57:51 +11:00
parent dc37389d02
commit 8cf9327936
@@ -124,12 +124,14 @@ void TimelineViewBlockItem::paint(QPainter *painter, const QStyleOptionGraphicsI
summary_index = sample_index;
}
for (int j=0;j<summary.size();j++) {
int channel_mid = channel_height * j + channel_half_height;
int line_x = i + rect().x();
painter->drawLine(i,
for (int j=0;j<summary.size();j++) {
int channel_mid = rect().y() + channel_height * j + channel_half_height;
painter->drawLine(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));
}
}