From 7e674e4331e768b9b29a20fed8419e0b6686357e Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Fri, 31 Jan 2014 21:29:56 +0100 Subject: [PATCH] pv::view::DecodeTrace: Draw annotation rows according to PD metadata. --- pv/view/decodetrace.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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); -- 2.30.2