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

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

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 24 Oct 2016 18:53:40 +0200
branch
6_1_x
changeset 5267
ede9faf7388a
parent 5261
e9e24583e6f4
child 5281
66e9b129897e

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

UI/Previewers/PreviewerHTML.py file | annotate | diff | comparison | revisions
--- a/UI/Previewers/PreviewerHTML.py	Fri Oct 21 18:42:11 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