Refresh tab stop distance after loading document (#1996)
This commit is contained in:
@@ -229,15 +229,13 @@ class GuiDocViewer(QTextBrowser):
|
|||||||
QApplication.restoreOverrideCursor()
|
QApplication.restoreOverrideCursor()
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# Refresh the tab stops
|
# Must be before setDocument
|
||||||
self.setTabStopDistance(CONFIG.getTabWidth())
|
|
||||||
|
|
||||||
# Must be before setHtml
|
|
||||||
if updateHistory:
|
if updateHistory:
|
||||||
self.docHistory.append(tHandle)
|
self.docHistory.append(tHandle)
|
||||||
|
|
||||||
self.setDocumentTitle(tHandle)
|
self.setDocumentTitle(tHandle)
|
||||||
self.setDocument(qDoc.document)
|
self.setDocument(qDoc.document)
|
||||||
|
self.setTabStopDistance(CONFIG.getTabWidth())
|
||||||
|
|
||||||
if self._docHandle == tHandle:
|
if self._docHandle == tHandle:
|
||||||
# This is a refresh, so we set the scrollbar back to where it was
|
# This is a refresh, so we set the scrollbar back to where it was
|
||||||
|
|||||||
@@ -823,6 +823,7 @@ class _PreviewWidget(QTextBrowser):
|
|||||||
|
|
||||||
document.setDocumentMargin(CONFIG.getTextMargin())
|
document.setDocumentMargin(CONFIG.getTextMargin())
|
||||||
self.setDocument(document)
|
self.setDocument(document)
|
||||||
|
self.setTabStopDistance(CONFIG.getTabWidth())
|
||||||
|
|
||||||
self._docTime = int(time())
|
self._docTime = int(time())
|
||||||
self._updateBuildAge()
|
self._updateBuildAge()
|
||||||
|
|||||||
Reference in New Issue
Block a user