fix: Paint the annotation mark used an invalid position

This commit is contained in:
dreamsourcelabTAI 2023-05-16 17:56:10 +08:00
parent e0c86995be
commit e7464a02d3

View File

@ -383,10 +383,12 @@ void DecodeTrace::draw_annotation(const pv::data::decode::Annotation &a,
((type%100 != a.type()%100) && (type%100 != 0)))
continue;
const double mark_end = a.end_sample() / samples_per_pixel - pixels_offset;
for(auto s : _session->get_signals()) {
if((s->get_index() == iter.second) && s->signal_type() == LOGIC_SIGNAL) {
view::LogicSignal *logicSig = (view::LogicSignal*)s;
logicSig->paint_mark(p, start, end, type/100);
logicSig->paint_mark(p, start, mark_end, type/100);
break;
}
}