From: Joel Holdsworth Date: Wed, 25 Sep 2013 07:17:49 +0000 (+0900) Subject: Refactored Trace::get_label_rect to use get_y X-Git-Tag: pulseview-0.2.0~278 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=f39936fb17239b1ee47161aa215352b11a03041a;p=pulseview.git Refactored Trace::get_label_rect to use get_y --- diff --git a/pv/view/trace.cpp b/pv/view/trace.cpp index 67ea3a02..e9424750 100644 --- a/pv/view/trace.cpp +++ b/pv/view/trace.cpp @@ -211,7 +211,6 @@ QRectF Trace::get_label_rect(int right) using pv::view::View; assert(_view); - const int y = _v_offset - _view->v_offset(); const QSizeF label_size( _text_size.width() + View::LabelPadding.width() * 2, @@ -219,7 +218,7 @@ QRectF Trace::get_label_rect(int right) const float label_arrow_length = label_size.height() / 2; return QRectF( right - label_arrow_length - label_size.width() - 0.5, - y + 0.5f - label_size.height() / 2, + get_y() + 0.5f - label_size.height() / 2, label_size.width(), label_size.height()); }