Make sure editor is clear if we're not re-loading a document when we're initialising it
This commit is contained in:
+4
-1
@@ -161,12 +161,15 @@ class GuiDocEditor(QTextEdit):
|
|||||||
# Initialise the syntax highlighter
|
# Initialise the syntax highlighter
|
||||||
self.hLight.initHighlighter()
|
self.hLight.initHighlighter()
|
||||||
|
|
||||||
# If we have a document open, we should reload it in case the font changed
|
# If we have a document open, we should reload it in case the font changed, otherwise
|
||||||
|
# we just clear the editor entirely, which makes it read only.
|
||||||
if self.theHandle is not None:
|
if self.theHandle is not None:
|
||||||
tHandle = self.theHandle
|
tHandle = self.theHandle
|
||||||
self.clearEditor()
|
self.clearEditor()
|
||||||
self.loadText(tHandle)
|
self.loadText(tHandle)
|
||||||
self.changeWidth()
|
self.changeWidth()
|
||||||
|
else:
|
||||||
|
self.clearEditor()
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user