From 796e136093befc76f6c223afff1c1221182cf5dd Mon Sep 17 00:00:00 2001 From: Soeren Apel Date: Tue, 29 Dec 2015 23:13:53 +0100 Subject: [PATCH] Fix #719 by calculating the decoder trace height dynamically --- pv/view/decodetrace.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pv/view/decodetrace.cpp b/pv/view/decodetrace.cpp index 31ea9d73..dd39b321 100644 --- a/pv/view/decodetrace.cpp +++ b/pv/view/decodetrace.cpp @@ -160,10 +160,10 @@ const std::shared_ptr& DecodeTrace::decoder() const pair DecodeTrace::v_extents() const { - /// @todo Replace this with an implementation that knows the true - /// height of the trace const int row_height = (ViewItemPaintParams::text_height() * 6) / 4; - return make_pair(-row_height / 2, row_height * 7 / 2); + const int rows = visible_rows_.size(); + + return make_pair(-row_height, row_height * rows); } void DecodeTrace::paint_back(QPainter &p, const ViewItemPaintParams &pp) -- 2.30.2