Hi,

second try (the first one didn't even compile, sorry about that). I tried 
to connect doubleClicked() to handleOpen() in class Browser but didn't 
realize that the constructor in the subclass SourcesBrowser did only 
call QListView.__init__, but not Browser.__init__. That's why I came up 
with the ugly workaround in patch #1. :-)

Here is a corrected one-liner that does open a python source file and 
jump to the correct line when it is double-clicked.

Ciao...

--- eric/ProjectBrowser.py	Fri Dec 13 13:52:23 2002
+++ /usr/lib/python2.2/site-packages/eric3/ProjectBrowser.py	Thu Dec 19 15:51:02 2002
@@ -108,6 +108,8 @@
         self.connect(self,SIGNAL('contextMenuRequested(QListViewItem *, const QPoint &, int)'),
                      self.handleContextMenu)
 
+        self.connect(self, SIGNAL('doubleClicked(QListViewItem *)'), self.handleOpen)
+
         req = QSize(250,350)
 
         if parent is not None:

Reply via email to