[GRASS-SVN] r41971 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Apr 22 04:53:29 EDT 2010


Author: martinl
Date: 2010-04-22 04:53:15 -0400 (Thu, 22 Apr 2010)
New Revision: 41971

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


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/gdialogs.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/gdialogs.py	2010-04-22 08:38:56 UTC (rev 41970)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/gdialogs.py	2010-04-22 08:53:15 UTC (rev 41971)
@@ -1407,14 +1407,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