From 20d13016a393c48f9b201b4a9ec8a852db794098 Mon Sep 17 00:00:00 2001 From: dreamsourcelabTAI Date: Mon, 17 Jul 2023 10:42:29 +0800 Subject: [PATCH] fix: Maybe some annotation object have not painted --- DSView/pv/view/decodetrace.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/DSView/pv/view/decodetrace.cpp b/DSView/pv/view/decodetrace.cpp index 448a22fc..49dddf10 100644 --- a/DSView/pv/view/decodetrace.cpp +++ b/DSView/pv/view/decodetrace.cpp @@ -339,12 +339,14 @@ void DecodeTrace::draw_annotation(const pv::data::decode::Annotation &a, const QColor &fill = Colours[colour]; const QColor &outline = OutlineColours[colour]; - if (start > right + DrawPadding || end < left - DrawPadding) + if (start > right + DrawPadding || end < left - DrawPadding){ return; + } - if (end - last_x <= 0.5){ + if (end - last_x <= 0.5 && end - start < 1){ return; } + last_x = end; if (_decoder_stack->get_mark_index() == (int64_t)(a.start_sample()+ a.end_sample())/2) {