--- a/eric7/QScintilla/Editor.py Tue May 25 17:16:13 2021 +0200 +++ b/eric7/QScintilla/Editor.py Tue May 25 17:16:40 2021 +0200 @@ -8402,7 +8402,7 @@ """ modifiers = evt.modifiers() button = evt.button() - key = (modifiers.value, button.value) + key = (modifiers, button) self.vm.eventFilter(self, evt) super().mouseReleaseEvent(evt) @@ -8430,8 +8430,8 @@ @return flag indicating success @rtype bool """ - if int(button): - key = (int(modifiers), int(button)) + if button and button != Qt.MouseButton.NoButton: + key = (modifiers, button) if key in self.__mouseClickHandlers: EricMessageBox.warning( self, @@ -8461,7 +8461,7 @@ @return plug-in name and registered function @rtype tuple of str and func """ - key = (int(modifiers), int(button)) + key = (modifiers, button) if key in self.__mouseClickHandlers: return self.__mouseClickHandlers[key] else: @@ -8476,7 +8476,7 @@ @type str @return registered mouse click handlers as list of modifiers, mouse button and function - @rtype list of tuple of (Qt.KeyboardModifiers, Qt.MouseButton,func) + @rtype list of tuple of (Qt.KeyboardModifiers, Qt.MouseButton, func) """ lst = [] for key, value in self.__mouseClickHandlers.items(): @@ -8493,7 +8493,7 @@ @param button mouse button of the handler @type Qt.MouseButton """ - key = (int(modifiers), int(button)) + key = (modifiers, button) if key in self.__mouseClickHandlers: del self.__mouseClickHandlers[key] @@ -8512,6 +8512,10 @@ for key in keys: del self.__mouseClickHandlers[key] + ####################################################################### + ## Methods implementing a Shell interface + ####################################################################### + def __executeSelection(self): """ Private slot to execute the selected text in the shell window.