[GRASS-SVN] r41622 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Mar 30 09:15:01 EDT 2010


Author: martinl
Date: 2010-03-30 09:15:01 -0400 (Tue, 30 Mar 2010)
New Revision: 41622

Modified:
   grass/trunk/gui/wxpython/gui_modules/gmodeler.py
Log:
wxGUI/modeler: fix double-click on data item


Modified: grass/trunk/gui/wxpython/gui_modules/gmodeler.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gmodeler.py	2010-03-30 13:10:52 UTC (rev 41621)
+++ grass/trunk/gui/wxpython/gui_modules/gmodeler.py	2010-03-30 13:15:01 UTC (rev 41622)
@@ -539,7 +539,11 @@
         @param direction direction of relation
         """
         self.actions[direction].append(action)
-        
+
+    def GetPropDialog(self):
+        """!Get properties dialog"""
+        return None
+    
 class ModelEvtHandler(ogl.ShapeEvtHandler):
     """!Model event handler class"""
     def __init__(self, log, frame):
@@ -578,12 +582,12 @@
         """!Left mouse button pressed (double-click) -> show properties"""
         shape = self.GetShape()
         win = shape.GetPropDialog()
-        if not win:
+        if isinstance(shape, ModelAction) and not win:
             module = menuform.GUI().ParseCommand(shape.cmd,
                                                  completed = (self.frame.GetOptData, shape, None),
                                                  parentframe = self.frame, show = True)
         
-        elif not win.IsShown():
+        elif win and not win.IsShown():
             win.Show()
         
         if win:



More information about the grass-commit mailing list