Skip to content

Commit 20d1301

Browse files
fix: Maybe some annotation object have not painted
1 parent 93b80a0 commit 20d1301

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

DSView/pv/view/decodetrace.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,12 +339,14 @@ void DecodeTrace::draw_annotation(const pv::data::decode::Annotation &a,
339339
const QColor &fill = Colours[colour];
340340
const QColor &outline = OutlineColours[colour];
341341

342-
if (start > right + DrawPadding || end < left - DrawPadding)
342+
if (start > right + DrawPadding || end < left - DrawPadding){
343343
return;
344+
}
344345

345-
if (end - last_x <= 0.5){
346+
if (end - last_x <= 0.5 && end - start < 1){
346347
return;
347348
}
349+
348350
last_x = end;
349351

350352
if (_decoder_stack->get_mark_index() == (int64_t)(a.start_sample()+ a.end_sample())/2) {

0 commit comments

Comments
 (0)