diff --git a/DSView/pv/view/decodetrace.cpp b/DSView/pv/view/decodetrace.cpp index 3d3aa376..a27c9b4a 100644 --- a/DSView/pv/view/decodetrace.cpp +++ b/DSView/pv/view/decodetrace.cpp @@ -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; } }