fix menu popping up outside window
authorThomasV <thomasv@gitorious>
Sun, 10 Jun 2012 18:36:30 +0000 (20:36 +0200)
committerThomasV <thomasv@gitorious>
Sun, 10 Jun 2012 18:36:30 +0000 (20:36 +0200)
lib/gui_qt.py

index 241d89a..7601203 100644 (file)
@@ -92,7 +92,7 @@ class MyTreeWidget(QTreeWidget):
         QTreeWidget.__init__(self, parent)
         def ddfr(item):
             if not item: return
-            for i in range(0,100):
+            for i in range(0,self.viewport().height()/5):
                 if self.itemAt(QPoint(0,i*5)) == item:
                     break
             else: