[GRASS-SVN] r42556 - in grass/trunk/gui/wxpython: gui_modules xml

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jun 14 04:32:49 EDT 2010


Author: martinl
Date: 2010-06-14 08:32:49 +0000 (Mon, 14 Jun 2010)
New Revision: 42556

Modified:
   grass/trunk/gui/wxpython/gui_modules/globalvar.py
   grass/trunk/gui/wxpython/gui_modules/gmodeler.py
   grass/trunk/gui/wxpython/xml/menudata_modeler.xml
Log:
wxGUI/modeler: various minor fixes


Modified: grass/trunk/gui/wxpython/gui_modules/globalvar.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/globalvar.py	2010-06-13 15:38:12 UTC (rev 42555)
+++ grass/trunk/gui/wxpython/gui_modules/globalvar.py	2010-06-14 08:32:49 UTC (rev 42556)
@@ -18,6 +18,8 @@
 import sys
 import locale
 
+if not os.getenv("GISBASE"):
+    sys.exit("GRASS is not running. Exiting...")
 ### i18N
 import gettext
 gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode=True)

Modified: grass/trunk/gui/wxpython/gui_modules/gmodeler.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gmodeler.py	2010-06-13 15:38:12 UTC (rev 42555)
+++ grass/trunk/gui/wxpython/gui_modules/gmodeler.py	2010-06-14 08:32:49 UTC (rev 42556)
@@ -1047,7 +1047,7 @@
         
         # add action to canvas
         width, height = self.canvas.GetSize()
-        action = ModelAction(self, cmd = cmd, x = width/2, y = height/2,
+        action = ModelAction(self.model, cmd = cmd, x = width/2, y = height/2,
                              id = len(self.model.GetActions()) + 1)
         overwrite = self.model.GetProperties().get('overwrite', None)
         if overwrite is not None:
@@ -1914,6 +1914,7 @@
         shape.InsertLineControlPoint(point = wx.RealPoint(self.x, self.y))
         shape.ResetShapes()
         shape.Select(True)
+        self.frame.ModelChanged()
         self.frame.canvas.Refresh()
         
     def OnRemovePoint(self, event):
@@ -1922,6 +1923,7 @@
         shape.DeleteLineControlPoint()
         shape.Select(False)
         shape.Select(True)
+        self.frame.ModelChanged()
         self.frame.canvas.Refresh()
         
     def OnIntermediate(self, event):

Modified: grass/trunk/gui/wxpython/xml/menudata_modeler.xml
===================================================================
--- grass/trunk/gui/wxpython/xml/menudata_modeler.xml	2010-06-13 15:38:12 UTC (rev 42555)
+++ grass/trunk/gui/wxpython/xml/menudata_modeler.xml	2010-06-14 08:32:49 UTC (rev 42556)
@@ -82,8 +82,8 @@
 	  <handler>OnDefineRelation</handler>
 	</menuitem>
 	<menuitem>
-	  <label>Define loop</label>
-	  <help>Defines loop in the model</help>
+	  <label>Add loop</label>
+	  <help>Adds loop to model</help>
 	  <handler>OnDefineLoop</handler>
 	  <shortcut>Ctrl+L</shortcut>
 	</menuitem>



More information about the grass-commit mailing list