forked from openlp/openlp
parent
b73a921dbc
commit
293443ba61
@ -43,9 +43,12 @@ class SpellTextEdit(QtGui.QPlainTextEdit):
|
|||||||
QtGui.QPlainTextEdit.__init__(self, *args)
|
QtGui.QPlainTextEdit.__init__(self, *args)
|
||||||
# Default dictionary based on the current locale.
|
# Default dictionary based on the current locale.
|
||||||
if enchant_available:
|
if enchant_available:
|
||||||
|
try:
|
||||||
self.dict = enchant.Dict()
|
self.dict = enchant.Dict()
|
||||||
self.highlighter = Highlighter(self.document())
|
self.highlighter = Highlighter(self.document())
|
||||||
self.highlighter.setDict(self.dict)
|
self.highlighter.setDict(self.dict)
|
||||||
|
except:
|
||||||
|
enchant_available = False
|
||||||
|
|
||||||
def mousePressEvent(self, event):
|
def mousePressEvent(self, event):
|
||||||
if event.button() == QtCore.Qt.RightButton:
|
if event.button() == QtCore.Qt.RightButton:
|
||||||
|
Loading…
Reference in New Issue
Block a user