Refresh tab stop distance after loading document (#1996)

This commit is contained in:
Veronica Berglyd Olsen
2024-09-01 17:38:04 +02:00
parent ece73784c2
commit e414b6458d
2 changed files with 3 additions and 4 deletions
+2 -4
View File
@@ -229,15 +229,13 @@ class GuiDocViewer(QTextBrowser):
QApplication.restoreOverrideCursor()
return False
# Refresh the tab stops
self.setTabStopDistance(CONFIG.getTabWidth())
# Must be before setHtml
# Must be before setDocument
if updateHistory:
self.docHistory.append(tHandle)
self.setDocumentTitle(tHandle)
self.setDocument(qDoc.document)
self.setTabStopDistance(CONFIG.getTabWidth())
if self._docHandle == tHandle:
# This is a refresh, so we set the scrollbar back to where it was
+1
View File
@@ -823,6 +823,7 @@ class _PreviewWidget(QTextBrowser):
document.setDocumentMargin(CONFIG.getTextMargin())
self.setDocument(document)
self.setTabStopDistance(CONFIG.getTabWidth())
self._docTime = int(time())
self._updateBuildAge()