restore baris tree expansion feature. Removed >print< statements.
[sface.git] / sface / rspecwindow.py
index 021d8fa..2abd5fd 100644 (file)
@@ -15,7 +15,6 @@ class RSpecView(XmlView):
         XmlView.__init__(self, parent)
 
     def expandMatchingText(self, txt):
-        print "LHS", txt
         self.collapseAll()
         self.expandToDepth(0)
 
@@ -28,8 +27,11 @@ class RSpecView(XmlView):
             self.expand(index)
 
         def search(index):
-            print index.data().toString()
-            if index.data().toString() == txt:
+            # voodoo alert: baris was using index.data()
+            # and apparently it worked. But after me
+            # messing around, only index.model().data(index)
+            # seems to give non-empty QVariant as output.
+            if index.model().data(index).toString() == txt:
                 recursiveExpand(index)
                 self.scrollTo(index, self.PositionAtCenter)
                 return
@@ -60,11 +62,9 @@ class RSpecWindow(QDialog):
         layout.addWidget(self.view)
         self.setLayout(layout)
         
-        print 'CHILDREN', str(self.children())
         self.updateView()
 
     def showNode(self, hostname):
-        print "SHOWNODE"
         self.view.expandMatchingText(hostname)
 
     def updateView(self):