Use zoom_perc instead of setZoomFactor to set zoom.
When using setZoomFactor, the NeighborList's fuzzyval doesn't get updated, which means the next -/+ press would do something weird.
This commit is contained in:
parent
0f1ba4739c
commit
f8d66f3fe1
@ -241,7 +241,7 @@ class BrowserPage(QWebPage):
|
|||||||
if cur_data is not None:
|
if cur_data is not None:
|
||||||
frame = self.mainFrame()
|
frame = self.mainFrame()
|
||||||
if 'zoom' in cur_data:
|
if 'zoom' in cur_data:
|
||||||
frame.setZoomFactor(cur_data['zoom'])
|
frame.page().view().zoom_perc(cur_data['zoom'] * 100)
|
||||||
if ('scroll-pos' in cur_data and
|
if ('scroll-pos' in cur_data and
|
||||||
frame.scrollPosition() == QPoint(0, 0)):
|
frame.scrollPosition() == QPoint(0, 0)):
|
||||||
QTimer.singleShot(0, functools.partial(
|
QTimer.singleShot(0, functools.partial(
|
||||||
@ -418,7 +418,7 @@ class BrowserPage(QWebPage):
|
|||||||
if data is None:
|
if data is None:
|
||||||
return
|
return
|
||||||
if 'zoom' in data:
|
if 'zoom' in data:
|
||||||
frame.setZoomFactor(data['zoom'])
|
frame.page().view().zoom_perc(data['zoom'] * 100)
|
||||||
if 'scroll-pos' in data and frame.scrollPosition() == QPoint(0, 0):
|
if 'scroll-pos' in data and frame.scrollPosition() == QPoint(0, 0):
|
||||||
frame.setScrollPosition(data['scroll-pos'])
|
frame.setScrollPosition(data['scroll-pos'])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user