From 4d4766471d0900ea6e771be1354c21c5e745c1e6 Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Tue, 30 Dec 2014 14:21:24 +0000 Subject: [PATCH 1/1] View: Added set_v_offset --- pv/view/view.cpp | 7 +++++++ pv/view/view.hpp | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/pv/view/view.cpp b/pv/view/view.cpp index 5e89397a..c09609ac 100644 --- a/pv/view/view.cpp +++ b/pv/view/view.cpp @@ -204,6 +204,13 @@ int View::owner_visual_v_offset() const return -verticalScrollBar()->sliderPosition(); } +void View::set_v_offset(int offset) +{ + verticalScrollBar()->setSliderPosition(offset); + header_->update(); + viewport_->update(); +} + unsigned int View::depth() const { return 0; diff --git a/pv/view/view.hpp b/pv/view/view.hpp index 2e8aebb4..74a5c375 100644 --- a/pv/view/view.hpp +++ b/pv/view/view.hpp @@ -108,6 +108,11 @@ public: */ int owner_visual_v_offset() const; + /** + * Sets the visual v-offset. + */ + void set_v_offset(int offset); + /** * Returns the SI prefix to apply to the graticule time markings. */ -- 2.30.2