use currentChanged slot instead of mouseReleaseEvent
authorBarış Metin <Talip-Baris.Metin@sophia.inria.fr>
Wed, 15 Sep 2010 16:02:18 +0000 (18:02 +0200)
committerBarış Metin <Talip-Baris.Metin@sophia.inria.fr>
Wed, 15 Sep 2010 16:02:18 +0000 (18:02 +0200)
sface/mainwindow.py
sface/screens/mainscreen.py

index c1c80b6..fde8ad8 100644 (file)
@@ -62,6 +62,7 @@ class Status(QLabel):
         self.setText("")
         QTimer.singleShot(1500, self.sliceUpdateDate)
 
+
 class MainWindow(QWidget):
     def __init__(self, parent=None):
         QWidget.__init__(self, parent)
index d56bca5..96b5728 100644 (file)
@@ -47,12 +47,10 @@ class NodeView(QTreeView):
 
         model.emit(SIGNAL("dataChanged(QModelIndex, QModelIndex)"), hostname_index, hostname_index)
 
-    def mouseReleaseEvent(self, event):
-        index = self.currentIndex()
-        model = index.model()
-        hostname_index = model.index(index.row(), 1, index.parent())
+    def currentChanged(self, current, previous):
+        model = current.model()
+        hostname_index = model.index(current.row(), 1, current.parent())
         hostname_data = hostname_index.data().toString()
-
         self.emit(SIGNAL('hostnameClicked(QString)'), hostname_data)