Fixed a situation where the scrollbar position of the HTML pre-viewer could not be saved (QtWebEngine variant).

Mon, 24 Oct 2016 18:53:40 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 24 Oct 2016 18:53:40 +0200
changeset 5266
c2abca3b5e7b
parent 5265
787d87769425
child 5268
748e4c50523b

Fixed a situation where the scrollbar position of the HTML pre-viewer could not be saved (QtWebEngine variant).

UI/Previewers/PreviewerHTML.py file | annotate | diff | comparison | revisions
--- a/UI/Previewers/PreviewerHTML.py	Sat Oct 22 18:35:10 2016 +0200
+++ b/UI/Previewers/PreviewerHTML.py	Mon Oct 24 18:53:40 2016 +0200
@@ -252,7 +252,10 @@
                 "return res;"
                 "})()"
             )
-            pos = QPoint(pos["x"], pos["y"])
+            if pos is not None:
+                pos = QPoint(pos["x"], pos["y"])
+            else:
+                pos = QPoint(0, 0)
             self.__scrollBarPositions[self.__previewedPath] = pos
             self.__hScrollBarAtEnd[self.__previewedPath] = False
             self.__vScrollBarAtEnd[self.__previewedPath] = False

eric ide

mercurial