Plugins/ViewManagerPlugins/Listspace/Listspace.py

branch
maintenance
changeset 6166
bace7fb85a01
parent 6097
bf18415da0c7
parent 6115
ac3a98f3ebc2
child 6646
51eefa621de4
diff -r 0c976706e8c1 -r bace7fb85a01 Plugins/ViewManagerPlugins/Listspace/Listspace.py
--- a/Plugins/ViewManagerPlugins/Listspace/Listspace.py	Sun Feb 04 10:56:30 2018 +0100
+++ b/Plugins/ViewManagerPlugins/Listspace/Listspace.py	Fri Mar 02 19:35:16 2018 +0100
@@ -449,7 +449,8 @@
             self.currentStack.addWidget(win)
             self.currentStack.setCurrentWidget(win)
         editor.captionChanged.connect(self.__captionChange)
-        editor.cursorLineChanged.connect(self.__cursorLineChanged)
+        editor.cursorLineChanged.connect(
+            lambda lineno: self.__cursorLineChanged(lineno, editor))
         
         index = self.editors.index(editor)
         self.viewlist.setCurrentRow(index)
@@ -477,14 +478,15 @@
         if fn:
             self.setEditorName(editor, 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:
             fn = editor.getFileName()
             if fn:

eric ide

mercurial