[GRASS-SVN] r41970 - grass/branches/releasebranch_6_4/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Apr 22 04:39:08 EDT 2010


Author: martinl
Date: 2010-04-22 04:38:56 -0400 (Thu, 22 Apr 2010)
New Revision: 41970

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/gdialogs.py
Log:
wxGUI: zoom to imported map
(merge r41968 from trunk)


Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/gdialogs.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/gdialogs.py	2010-04-22 08:36:47 UTC (rev 41969)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/gdialogs.py	2010-04-22 08:38:56 UTC (rev 41970)
@@ -1286,14 +1286,15 @@
             if UserSettings.Get(group='cmd', key='rasterOpaque', subkey='enabled'):
                 cmd.append('-n')
             
-            maptree.AddLayer(ltype='raster',
-                             lname=name,
-                             lcmd=cmd)
+            item = maptree.AddLayer(ltype='raster',
+                                    lname=name,
+                                    lcmd=cmd)
         else:
-            maptree.AddLayer(ltype='vector',
-                             lname=name,
-                             lcmd=['d.vect',
-                                   'map=%s' % name])
+            item = maptree.AddLayer(ltype='vector',
+                                    lname=name,
+                                    lcmd=['d.vect',
+                                          'map=%s' % name])
+        maptree.mapdisplay.MapWindow.ZoomToMap()
         
     def OnAbort(self, event):
         """!Abort running import



More information about the grass-commit mailing list