]> sigrok.org Git - pulseview.git/blobdiff - pv/view/view.cpp
View: Fix #513 by scrolling 1/8th the view height per step
[pulseview.git] / pv / view / view.cpp
index 3df87e540b986b0e08b1242c9139950f65f12a5b..539581ad1ce95bd934c5f030639455c235ce7e8d 100644 (file)
@@ -198,6 +198,7 @@ const Viewport* View::viewport() const
 vector< shared_ptr<TimeItem> > View::time_items() const
 {
        vector< shared_ptr<TimeItem> > items;
+       items.push_back(cursors_);
        items.push_back(cursors_->first());
        items.push_back(cursors_->second());
        return items;
@@ -482,6 +483,7 @@ void View::update_scroll()
 
        // Set the vertical scrollbar
        verticalScrollBar()->setPageStep(areaSize.height());
+       verticalScrollBar()->setSingleStep(areaSize.height() / 8);
 
        const pair<int, int> extents = v_extents();
        const int extra_scroll_height = (extents.second - extents.first) / 4;