Fixed but untested

Fixes: https://launchpad.net/bugs/642778
This commit is contained in:
Tim Bentley 2010-09-20 06:06:18 +01:00
parent b73a921dbc
commit 293443ba61
1 changed files with 6 additions and 3 deletions

View File

@ -43,9 +43,12 @@ class SpellTextEdit(QtGui.QPlainTextEdit):
QtGui.QPlainTextEdit.__init__(self, *args)
# Default dictionary based on the current locale.
if enchant_available:
self.dict = enchant.Dict()
self.highlighter = Highlighter(self.document())
self.highlighter.setDict(self.dict)
try:
self.dict = enchant.Dict()
self.highlighter = Highlighter(self.document())
self.highlighter.setDict(self.dict)
except:
enchant_available = False
def mousePressEvent(self, event):
if event.button() == QtCore.Qt.RightButton: