From 23739e7dec587053ea2c7089f47b41613bb48159 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 28 Mar 2012 10:58:02 +0530 Subject: [PATCH] E-book viewer: Allow the up and down keys to scroll past section boundaries --- src/calibre/gui2/viewer/documentview.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/calibre/gui2/viewer/documentview.py b/src/calibre/gui2/viewer/documentview.py index 4992510dc4..6af7873257 100644 --- a/src/calibre/gui2/viewer/documentview.py +++ b/src/calibre/gui2/viewer/documentview.py @@ -982,8 +982,12 @@ class DocumentView(QWebView): # {{{ finally: self.is_auto_repeat_event = False elif key == 'Down': + if self.document.at_bottom: + self.manager.next_document() self.scroll_by(y=15) elif key == 'Up': + if self.document.at_top: + self.manager.previous_document() self.scroll_by(y=-15) elif key == 'Left': self.scroll_by(x=-15)