X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fdecodetrace.cpp;h=8c230ad42384cc093ba094ac9bd401377997061d;hp=37beed98779d73fb8043567cb48d5beeff18e25c;hb=7e674e4331e768b9b29a20fed8419e0b6686357e;hpb=6d8b05622f1e422c7193656c9eac3ebae5b6b934 diff --git a/pv/view/decodetrace.cpp b/pv/view/decodetrace.cpp index 37beed98..8c230ad4 100644 --- a/pv/view/decodetrace.cpp +++ b/pv/view/decodetrace.cpp @@ -155,9 +155,15 @@ void DecodeTrace::paint_mid(QPainter &p, int left, int right) assert(_decoder_stack); vector annotations(_decoder_stack->annotations()); - BOOST_FOREACH(const Annotation &a, annotations) + + BOOST_FOREACH(const Annotation &a, annotations) { + // Every annotation row is 20 pixels further down. + int y_ann_row_offset = a.row() * 20; + draw_annotation(a, p, get_text_colour(), h, left, right, - samples_per_pixel, pixels_offset, y); + samples_per_pixel, pixels_offset, + y + y_ann_row_offset); + } draw_unresolved_period(p, h, left, right, samples_per_pixel, pixels_offset);