Tasks/TaskViewer.py

changeset 2099
afde0e9110f7
parent 2000
a81bf687e4ee
child 2197
c4f24f8f34c0
diff -r c5809ca16182 -r afde0e9110f7 Tasks/TaskViewer.py
--- a/Tasks/TaskViewer.py	Wed Oct 03 17:55:56 2012 +0200
+++ b/Tasks/TaskViewer.py	Wed Oct 03 19:15:04 2012 +0200
@@ -137,6 +137,8 @@
         self.__backMenu.addSeparator()
         self.__backMenu.addAction(self.trUtf8("Configure..."), self.__configure)
         
+        self.__activating = False
+        
         self.setContextMenuPolicy(Qt.CustomContextMenu)
         self.customContextMenuRequested.connect(self.__showContextMenu)
         self.itemActivated.connect(self.__taskItemActivated)
@@ -180,11 +182,14 @@
         @param itm reference to the activated item (QTreeWidgetItem)
         @param col column the item was activated in (integer)
         """
-        fn = itm.getFilename()
-        if fn:
-            self.displayFile.emit(fn, itm.getLineno())
-        else:
-            self.__editTaskProperties()
+        if not self.__activating:
+            self.__activating = True
+            fn = itm.getFilename()
+            if fn:
+                self.displayFile.emit(fn, itm.getLineno())
+            else:
+                self.__editTaskProperties()
+            self.__activating = False
 
     def __showContextMenu(self, coord):
         """

eric ide

mercurial