Selaa lähdekoodia

wxGUI/modeler: fix double-click on data item

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@41622 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 15 vuotta sitten
vanhempi
commit
0b2f8f0935
1 muutettua tiedostoa jossa 7 lisäystä ja 3 poistoa
  1. 7 3
      gui/wxpython/gui_modules/gmodeler.py

+ 7 - 3
gui/wxpython/gui_modules/gmodeler.py

@@ -539,7 +539,11 @@ class ModelData(ogl.EllipseShape):
         @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 @@ class ModelEvtHandler(ogl.ShapeEvtHandler):
         """!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: