use currentChanged slot instead of mouseReleaseEvent
[sface.git] / sface / screens / mainscreen.py
index d56bca5..96b5728 100644 (file)
@@ -47,12 +47,10 @@ class NodeView(QTreeView):
 
         model.emit(SIGNAL("dataChanged(QModelIndex, QModelIndex)"), hostname_index, hostname_index)
 
 
         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()
         hostname_data = hostname_index.data().toString()
-
         self.emit(SIGNAL('hostnameClicked(QString)'), hostname_data)
         
                 
         self.emit(SIGNAL('hostnameClicked(QString)'), hostname_data)