Skip to content

Commit

Permalink
fix: Maybe some annotation object have not painted
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamsource-tai committed Jul 17, 2023
1 parent 93b80a0 commit 20d1301
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions DSView/pv/view/decodetrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 20d1301

Please sign in to comment.