]> sigrok.org Git - pulseview.git/blobdiff - pv/view/viewport.cpp
Added RowItemOwner
[pulseview.git] / pv / view / viewport.cpp
index f0c78e67fcd727bdea0249120259b80331f8f1b1..7108638588b054a42562b556984236302704c6a9 100644 (file)
@@ -19,6 +19,7 @@
  */
 
 #include <cassert>
+#include <cmath>
 
 #include "view.h"
 #include "viewport.h"
@@ -28,6 +29,7 @@
 
 #include <QMouseEvent>
 
+using std::abs;
 using std::max;
 using std::min;
 using std::shared_ptr;
@@ -65,7 +67,7 @@ int Viewport::get_total_height() const
        const vector< shared_ptr<Trace> > traces(_view.get_traces());
        for (const shared_ptr<Trace> t : traces) {
                assert(t);
-               h = max(t->get_v_offset() + View::SignalHeight, h);
+               h = max(t->v_offset() + View::SignalHeight, h);
        }
 
        return h;