Random cleanups

This commit is contained in:
Florian Bruhin 2016-06-15 14:23:24 +02:00
parent ac4186a0f0
commit 5c535213ad
2 changed files with 5 additions and 5 deletions

View File

@ -281,8 +281,8 @@ class AbstractHistory:
"""The history attribute of a AbstractTab."""
def __init__(self, tab):
self.tab = tab
self.widget = None
self._tab = tab
self.history = None
def __iter__(self):
raise NotImplementedError

View File

@ -352,11 +352,11 @@ class WebViewHistory(tab.AbstractHistory):
cur_data = self.history.currentItem().userData()
if cur_data is not None:
if 'zoom' in cur_data:
self.tab.zoom.set_factor(cur_data['zoom'])
self._tab.zoom.set_factor(cur_data['zoom'])
if ('scroll-pos' in cur_data and
self.tab.scroll.pos_px() == QPoint(0, 0)):
self._tab.scroll.pos_px() == QPoint(0, 0)):
QTimer.singleShot(0, functools.partial(
self.tab.scroll, cur_data['scroll-pos']))
self._tab.scroll, cur_data['scroll-pos']))
class WebViewTab(tab.AbstractTab):