From: Soeren Apel Date: Sat, 13 Dec 2014 10:20:03 +0000 (+0000) Subject: View: Fix #515 by fixing typo and extent handling X-Git-Tag: pulseview-0.3.0~360 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=f1d9ac673ce644a7e2397bd1c4687083157f4a17;p=pulseview.git View: Fix #515 by fixing typo and extent handling Typo: extents.first instead of extents.second The extra scoll height was too large and could result in all traces being removed from view. To avoid this, the user now has half of the view height as extra scroll height. --- diff --git a/pv/view/view.cpp b/pv/view/view.cpp index 539581ad..f349861f 100644 --- a/pv/view/view.cpp +++ b/pv/view/view.cpp @@ -486,9 +486,8 @@ void View::update_scroll() verticalScrollBar()->setSingleStep(areaSize.height() / 8); const pair extents = v_extents(); - const int extra_scroll_height = (extents.second - extents.first) / 4; - verticalScrollBar()->setRange(extents.first - extra_scroll_height, - extents.first + extra_scroll_height); + verticalScrollBar()->setRange(extents.first - (areaSize.height() / 2), + extents.second - (areaSize.height() / 2)); } void View::update_layout()