Sat, 07 Apr 2012 16:39:36 +0200
Fixed another issue with a multi-connected signal.
QScintilla/Editor.py | file | annotate | diff | comparison | revisions |
--- a/QScintilla/Editor.py Fri Apr 06 17:01:11 2012 +0200 +++ b/QScintilla/Editor.py Sat Apr 07 16:39:36 2012 +0200 @@ -11,7 +11,7 @@ import difflib from PyQt4.QtCore import QDir, QTimer, QModelIndex, QFileInfo, pyqtSignal, \ - QCryptographicHash, QEvent, QDateTime, QRegExp, Qt + pyqtSlot, QCryptographicHash, QEvent, QDateTime, QRegExp, Qt from PyQt4.QtGui import QCursor, QPrinter, QPrintDialog, QLineEdit, QActionGroup, \ QDialog, QAbstractPrintDialog, QInputDialog, QApplication, QMenu, QPalette, QFont from PyQt4.Qsci import QsciScintilla, QsciMacro, QsciStyledText @@ -5982,7 +5982,10 @@ Public method to set the automatic spell checking. """ if Preferences.getEditor("AutoSpellCheckingEnabled"): - self.SCN_CHARADDED.connect(self.__spellCharAdded) + try: + self.SCN_CHARADDED.connect(self.__spellCharAdded, Qt.UniqueConnection) + except TypeError: + pass self.spell.checkDocumentIncrementally() else: try: @@ -6006,6 +6009,7 @@ self.lexer_.isStringStyle(style) return True + @pyqtSlot(int) def __spellCharAdded(self, charNumber): """ Public slot called to handle the user entering a character.