Implement the same tab stop code in the editor as for the viewer
This commit is contained in:
+6
-2
@@ -206,8 +206,6 @@ class GuiDocEditor(QTextEdit):
|
||||
# Also set the document text options for the document text flow
|
||||
theOpt = QTextOption()
|
||||
|
||||
if self.mainConf.verQtValue >= 51000:
|
||||
theOpt.setTabStopDistance(self.mainConf.getTabWidth())
|
||||
if self.mainConf.doJustify:
|
||||
theOpt.setAlignment(Qt.AlignJustify)
|
||||
if self.mainConf.showTabsNSpaces:
|
||||
@@ -288,6 +286,12 @@ class GuiDocEditor(QTextEdit):
|
||||
self.hLight.spellCheck = spTemp
|
||||
qApp.restoreOverrideCursor()
|
||||
|
||||
# Refresh the tab stops
|
||||
if self.mainConf.verQtValue >= 51000:
|
||||
self.setTabStopDistance(self.mainConf.getTabWidth())
|
||||
else:
|
||||
self.setTabStopWidth(self.mainConf.getTabWidth())
|
||||
|
||||
return True
|
||||
|
||||
def replaceText(self, theText):
|
||||
|
||||
Reference in New Issue
Block a user