Make sure scroll past end margin cannot be negative
This commit is contained in:
+2
-1
@@ -440,7 +440,8 @@ class GuiDocEditor(QTextEdit):
|
|||||||
|
|
||||||
if self.mainConf.scrollPastEnd:
|
if self.mainConf.scrollPastEnd:
|
||||||
docFrame = self.qDocument.rootFrame().frameFormat()
|
docFrame = self.qDocument.rootFrame().frameFormat()
|
||||||
docFrame.setBottomMargin(wH - uM - lM - 5*self.theTheme.fontPixelSize)
|
docMargin = wH - uM - lM - 5*self.theTheme.fontPixelSize
|
||||||
|
docFrame.setBottomMargin(max(0, docMargin))
|
||||||
self.qDocument.rootFrame().setFrameFormat(docFrame)
|
self.qDocument.rootFrame().setFrameFormat(docFrame)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user