X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fviews%2Ftrace%2Fdecodetrace.cpp;h=9529c50a72650958ce7f0b3abdc93b67a01a6f21;hb=6d2802aa2f53bcfc3a9a56ee65be5b88750b6cdd;hp=b0395eaa05dc685828a6d31d3d69a1383be59361;hpb=20f59e957e70250cfb876ac7a1743134d6b83339;p=pulseview.git diff --git a/pv/views/trace/decodetrace.cpp b/pv/views/trace/decodetrace.cpp index b0395ea..9529c50 100644 --- a/pv/views/trace/decodetrace.cpp +++ b/pv/views/trace/decodetrace.cpp @@ -248,11 +248,13 @@ void DecodeTrace::paint_mid(QPainter &p, ViewItemPaintParams &pp) // Draw the hatching draw_unresolved_period(p, annotation_height, pp.left(), pp.right()); - if ((int)visible_rows_.size() > max_visible_rows_) - owner_->extents_changed(false, true); + if ((int)visible_rows_.size() > max_visible_rows_) { + max_visible_rows_ = (int)visible_rows_.size(); - // Update the maximum row count if needed - max_visible_rows_ = max(max_visible_rows_, (int)visible_rows_.size()); + // Call order is important, otherwise the lazy event handler won't work + owner_->extents_changed(false, true); + owner_->row_item_appearance_changed(false, true); + } } void DecodeTrace::paint_fore(QPainter &p, ViewItemPaintParams &pp) @@ -716,6 +718,12 @@ void DecodeTrace::hover_point_changed() assert(view); QPoint hp = view->hover_point(); + + if (hp.x() == 0) { + QToolTip::hideText(); + return; + } + QString ann = get_annotation_at_point(hp); assert(view);