]> sigrok.org Git - pulseview.git/blobdiff - pv/views/trace/decodetrace.cpp
DecodeTrace: Honor a decoder's shown flag
[pulseview.git] / pv / views / trace / decodetrace.cpp
index e3c1185e75fdcdf853071b09a59871c10d698c46..30f333ddc7c4fe033ed439653f57354ab6fd68fd 100644 (file)
@@ -211,7 +211,8 @@ void DecodeTrace::paint_mid(QPainter &p, ViewItemPaintParams &pp)
                // Show row if there are visible annotations or when user wants to see
                // all rows that have annotations somewhere and this one is one of them
                size_t ann_count = decode_signal_->get_annotation_count(r.decode_row, current_segment_);
-               r.currently_visible = !annotations.empty() || (always_show_all_rows_ && (ann_count > 0));
+               r.currently_visible = (!annotations.empty() || (always_show_all_rows_ && (ann_count > 0)))
+                       && (r.decode_row.decoder()->shown());
 
                if (r.currently_visible) {
                        draw_annotations(annotations, p, annotation_height, pp, y,
@@ -1094,7 +1095,7 @@ void DecodeTrace::export_annotations(vector<Annotation> *annotations) const
                        QString out_text = format;
                        out_text = out_text.replace("%s", sample_range);
                        out_text = out_text.replace("%d",
-                               quote + QString::fromUtf8(ann.row()->decoder()->name) + quote);
+                               quote + QString::fromUtf8(ann.row()->decoder()->name()) + quote);
                        out_text = out_text.replace("%c", class_name);
                        out_text = out_text.replace("%1", first_ann_text);
                        out_text = out_text.replace("%a", all_ann_text);