X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fviews%2Ftrace%2Fdecodetrace.cpp;fp=pv%2Fviews%2Ftrace%2Fdecodetrace.cpp;h=409f1d282abc209d7753509b42f2c810abf2f5eb;hp=5b9b3f36c586568111684bfbfc73fd491b1a208e;hb=c583ea05e31967f78870ebbe19f6794e51f512c6;hpb=9431e2d3d256f3602c3637847a8ec3ad3fdcd590 diff --git a/pv/views/trace/decodetrace.cpp b/pv/views/trace/decodetrace.cpp index 5b9b3f36..409f1d28 100644 --- a/pv/views/trace/decodetrace.cpp +++ b/pv/views/trace/decodetrace.cpp @@ -1032,8 +1032,17 @@ const QString DecodeTrace::get_annotation_at_point(const QPoint &point) decode_signal_->get_annotation_subset(annotations, r->decode_row, current_segment_, sample_range.first, sample_range.second); - return (annotations.empty()) ? - QString() : annotations[0]->annotations()->front(); + const Annotation* a = annotations.empty() ? nullptr : annotations[0]; + + // Create a string of the format "CLASS: VALUE" + QString s; + if (a) { + if (!a->ann_class_description().isEmpty()) + s = a->ann_class_description() + ": "; + s += a->annotations()->front(); + } + + return s; } void DecodeTrace::create_decoder_form(int index, shared_ptr &dec,