Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/readactivity.py
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2012-09-10 19:25:38 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2012-09-10 19:25:38 (GMT)
commit12021bd6de3800042befa003db87c09f6fcad97d (patch)
tree578e35661f6fa5dd04f635328cd166b5d969e8f7 /readactivity.py
parent11435850ea587da2c3f7cebfad7d5a7fdc37bdb2 (diff)
Keep the text position in the epub files - SL #3861
When the zoom level change or the index view to is shown / hidden. Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'readactivity.py')
-rw-r--r--readactivity.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/readactivity.py b/readactivity.py
index fd464a3..169a4ed 100644
--- a/readactivity.py
+++ b/readactivity.py
@@ -432,6 +432,7 @@ class ReadActivity(activity.Activity):
self._navigator.set_model(model)
def __toogle_navigator_cb(self, button, visible):
+ scrollbar_pos = self._view.get_vertical_pos()
if visible:
self._toc_visible = True
self._update_toc_view = True
@@ -444,6 +445,7 @@ class ReadActivity(activity.Activity):
self._toc_visible = False
self._toc_scroller.hide()
self._toc_separator.hide()
+ self._view.set_vertical_pos(scrollbar_pos)
def __num_page_entry_insert_text_cb(self, entry, text, length, position):
if not re.match('[0-9]', text):