From 293443ba61ceaa7c5347bcf58f2cc68399e69d84 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Mon, 20 Sep 2010 06:06:18 +0100 Subject: [PATCH] Fixed but untested Fixes: https://launchpad.net/bugs/642778 --- openlp/core/lib/spelltextedit.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/openlp/core/lib/spelltextedit.py b/openlp/core/lib/spelltextedit.py index 7d227079b..e7f3d7ef0 100644 --- a/openlp/core/lib/spelltextedit.py +++ b/openlp/core/lib/spelltextedit.py @@ -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: