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
|
# Also set the document text options for the document text flow
|
||||||
theOpt = QTextOption()
|
theOpt = QTextOption()
|
||||||
|
|
||||||
if self.mainConf.verQtValue >= 51000:
|
|
||||||
theOpt.setTabStopDistance(self.mainConf.getTabWidth())
|
|
||||||
if self.mainConf.doJustify:
|
if self.mainConf.doJustify:
|
||||||
theOpt.setAlignment(Qt.AlignJustify)
|
theOpt.setAlignment(Qt.AlignJustify)
|
||||||
if self.mainConf.showTabsNSpaces:
|
if self.mainConf.showTabsNSpaces:
|
||||||
@@ -288,6 +286,12 @@ class GuiDocEditor(QTextEdit):
|
|||||||
self.hLight.spellCheck = spTemp
|
self.hLight.spellCheck = spTemp
|
||||||
qApp.restoreOverrideCursor()
|
qApp.restoreOverrideCursor()
|
||||||
|
|
||||||
|
# Refresh the tab stops
|
||||||
|
if self.mainConf.verQtValue >= 51000:
|
||||||
|
self.setTabStopDistance(self.mainConf.getTabWidth())
|
||||||
|
else:
|
||||||
|
self.setTabStopWidth(self.mainConf.getTabWidth())
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def replaceText(self, theText):
|
def replaceText(self, theText):
|
||||||
|
|||||||
Reference in New Issue
Block a user