+ if (sticky_scrolling_) {
+ if (!delayed_view_updater_.isActive())
+ delayed_view_updater_.start();
+ } else {
+ update_scroll();
+ ruler_->update();
+ viewport_->update();
+ }
+}
+
+void View::perform_delayed_view_update()
+{
+ if (sticky_scrolling_) {
+ // Make right side of the view sticky
+ double length = 0, offset;
+ get_scroll_layout(length, offset);
+
+ const QSize areaSize = viewport_->size();
+ length = max(length - areaSize.width(), 0.0);
+
+ offset_ = scale_ * length;
+ }