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

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Mar 30 12:13:58 EDT 2010


Author: martinl
Date: 2010-03-30 12:13:57 -0400 (Tue, 30 Mar 2010)
New Revision: 41630

Modified:
   grass/trunk/gui/wxpython/gui_modules/gmodeler.py
   grass/trunk/gui/wxpython/gui_modules/menuform.py
Log:
wxGUI/modeler: load model file from command line


Modified: grass/trunk/gui/wxpython/gui_modules/gmodeler.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gmodeler.py	2010-03-30 16:02:14 UTC (rev 41629)
+++ grass/trunk/gui/wxpython/gui_modules/gmodeler.py	2010-03-30 16:13:57 UTC (rev 41630)
@@ -20,6 +20,7 @@
 """
 
 import os
+import sys
 import shlex
 import time
 import traceback
@@ -433,10 +434,8 @@
 
     def SetProperties(self, dcmd, params, propwin):
         """!Record properties dialog"""
-        if dcmd:
-            self.cmd = dcmd
-        if self.params:
-            self.params = params
+        self.cmd = dcmd
+        self.params = params
         self.propWin = propwin
 
     def GetPropDialog(self):
@@ -887,6 +886,8 @@
 def main():
     app = wx.PySimpleApp()
     frame = ModelFrame(parent = None)
+    if len(sys.argv) > 1:
+        frame.LoadModelFile(sys.argv[1])
     # frame.CentreOnScreen()
     frame.Show()
     

Modified: grass/trunk/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/menuform.py	2010-03-30 16:02:14 UTC (rev 41629)
+++ grass/trunk/gui/wxpython/gui_modules/menuform.py	2010-03-30 16:13:57 UTC (rev 41630)
@@ -994,7 +994,6 @@
                 self.parent.Delete(self.layer)
                 self.Destroy()
         elif self.parent and self.parent.GetName() == 'Modeler':
-            self.get_dcmd(None, self.layer, None, None)
             self.Destroy()
         else:
             # cancel for non-display commands



More information about the grass-commit mailing list