--- a/Plugins/ViewManagerPlugins/Tabview/Tabview.py Sun Feb 04 10:56:30 2018 +0100 +++ b/Plugins/ViewManagerPlugins/Tabview/Tabview.py Fri Mar 02 19:35:16 2018 +0100 @@ -379,7 +379,8 @@ if editor not in self.editors: self.editors.append(editor) editor.captionChanged.connect(self.__captionChange) - editor.cursorLineChanged.connect(self.__cursorLineChanged) + editor.cursorLineChanged.connect( + lambda lineno: self.__cursorLineChanged(lineno, editor)) emptyIndex = self.indexOf(self.emptyLabel) if emptyIndex > -1: @@ -412,7 +413,8 @@ if editor not in self.editors: self.editors.append(editor) editor.captionChanged.connect(self.__captionChange) - editor.cursorLineChanged.connect(self.__cursorLineChanged) + editor.cursorLineChanged.connect( + lambda lineno: self.__cursorLineChanged(lineno, editor)) emptyIndex = self.indexOf(self.emptyLabel) if emptyIndex > -1: self.removeTab(emptyIndex) @@ -451,14 +453,15 @@ self.setTabText(index, txt) self.setTabToolTip(index, fn) - def __cursorLineChanged(self, lineno): + def __cursorLineChanged(self, lineno, editor): """ Private slot to handle a change of the current editor's cursor line. - @param lineno line number of the current editor's cursor (zero based) + @param lineno line number of the editor's cursor (zero based) @type int + @param editor reference to the editor + @type Editor """ - editor = self.sender() if editor and isinstance(editor, QScintilla.Editor.Editor): fn = editor.getFileName() if fn: @@ -472,8 +475,8 @@ @type QWidget """ if isinstance(widget, QScintilla.Editor.Editor): - widget.cursorLineChanged.disconnect(self.__cursorLineChanged) - widget.captionChanged.disconnect(self.__captionChange) + widget.cursorLineChanged.disconnect() + widget.captionChanged.disconnect() self.editors.remove(widget) index = self.indexOf(widget.parent()) else: