E-book viewer: Fix text not being reflowed when resizing the viewer window and only the height changes.

This commit is contained in:
Kovid Goyal 2014-09-03 16:43:09 +05:30
parent 1e85a69401
commit 1e1869bce8

View File

@ -660,14 +660,6 @@ class EbookViewer(MainWindow):
self.view.load_path(path, pos=pos) self.view.load_path(path, pos=pos)
def viewport_resize_started(self, event): def viewport_resize_started(self, event):
old, curr = event.size(), event.oldSize()
if not self.window_mode_changed and old.width() == curr.width():
# No relayout changes, so page position does not need to be saved
# This is needed as Qt generates a viewport resized event that
# changes only the height after a file has been loaded. This can
# cause the last read position bookmark to become slightly
# inaccurate
return
if not self.resize_in_progress: if not self.resize_in_progress:
# First resize, so save the current page position # First resize, so save the current page position
self.resize_in_progress = True self.resize_in_progress = True