--- a/eric7/QScintilla/Editor.py Sat Sep 04 20:26:21 2021 +0200 +++ b/eric7/QScintilla/Editor.py Sun Sep 05 16:30:19 2021 +0200 @@ -438,6 +438,7 @@ self.SCN_DWELLSTART.connect(self.__showMouseHoverHelp) self.SCN_DWELLEND.connect(self.__cancelMouseHoverHelp) self.__mouseHoverHelp = None + self.__showingMouseHoverHelp = False # set the text display again self.__setTextDisplay() @@ -5384,7 +5385,7 @@ ch, pos = self.__getCharacter(pos) - self.SendScintilla(QsciScintilla.SCI_CALLTIPCANCEL) + self.cancelCallTips() if not found: return @@ -7148,7 +7149,7 @@ self.vm.editorActGrp.setEnabled(False) self.setCaretWidth(0) - self.SendScintilla(QsciScintilla.SCI_CALLTIPCANCEL) + self.cancelCallTips() super().focusOutEvent(event) @@ -8595,6 +8596,8 @@ (reference.modulePath, reference.line, reference.column)) if references: + if self.isCallTipActive(): + self.cancelCallTips() self.__referencesList = references self.__referencesPositionsList = referencePositions self.showUserList(ReferencesListID, references) @@ -8866,20 +8869,23 @@ @param y y-value of mouse screen position @type int """ - if self.__mouseHoverHelp is not None and pos > 0 and y > 0: - line, index = self.lineIndexFromPosition(pos) - if index > 0: - self.__mouseHoverHelp(self, line, index) + if not self.isCallTipActive() and not self.isListActive(): + if self.__mouseHoverHelp is not None and pos > 0 and y > 0: + line, index = self.lineIndexFromPosition(pos) + if index > 0: + self.__mouseHoverHelp(self, line, index) + else: + self.__cancelMouseHoverHelp() else: self.__cancelMouseHoverHelp() - else: - self.__cancelMouseHoverHelp() def __cancelMouseHoverHelp(self): """ Private slot cancelling the display of mouse hover help. """ - self.SendScintilla(QsciScintilla.SCI_CALLTIPCANCEL) + if self.__showingMouseHoverHelp: + self.cancelCallTips() + self.__showingMouseHoverHelp = False def registerMouseHoverHelpFunction(self, func): """ @@ -8920,5 +8926,6 @@ pos = self.positionFromLineIndex(line, index) self.SendScintilla(QsciScintilla.SCI_CALLTIPSHOW, pos, self._encodeString(data)) + self.__showingMouseHoverHelp = True else: self.__cancelMouseHoverHelp()