[GRASS-SVN] r65236 - grass/trunk/gui/wxpython/lmgr

svn_grass at osgeo.org svn_grass at osgeo.org
Thu May 14 18:20:19 PDT 2015


Author: annakrat
Date: 2015-05-14 18:20:19 -0700 (Thu, 14 May 2015)
New Revision: 65236

Modified:
   grass/trunk/gui/wxpython/lmgr/layertree.py
Log:
wxGUI: removed item (g.region zoom) from layer context menu

Modified: grass/trunk/gui/wxpython/lmgr/layertree.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/layertree.py	2015-05-14 13:00:38 UTC (rev 65235)
+++ grass/trunk/gui/wxpython/lmgr/layertree.py	2015-05-15 01:20:19 UTC (rev 65236)
@@ -404,7 +404,7 @@
             self.popupID = dict()
             for key in ('remove', 'rename', 'opacity', 'nviz', 'zoom',
                         'region', 'export', 'attr', 'edit', 'save_ws',
-                        'bgmap', 'topo', 'meta', 'null', 'zoom1', 'region1',
+                        'bgmap', 'topo', 'meta', 'null', 'zoom1',
                         'color', 'hist', 'univar', 'prof', 'properties', 'sql', 'copy',
                         'report', 'export-pg', 'pack'):
                 self.popupID[key] = wx.NewId()
@@ -577,8 +577,6 @@
             if same:
                 self.popupMenu.Append(self.popupID['zoom1'], text=_("Zoom to selected map(s) (ignore NULLs)"))
                 self.Bind(wx.EVT_MENU, self.mapdisplay.OnZoomToRaster, id=self.popupID['zoom1'])
-                self.popupMenu.Append(self.popupID['region1'], text=_("Set computational region from selected map(s) (ignore NULLs)"))
-                self.Bind(wx.EVT_MENU, self.OnSetCompRegFromRaster, id=self.popupID['region1'])
             
             self.popupMenu.AppendSeparator()
             
@@ -699,12 +697,13 @@
         self._giface.RunCmd(cmd)
 
     def OnSetCompRegFromRaster(self, event):
-        """Set computational region from selected raster map (ignore NULLs)"""
+        """Set computational region from selected raster map (ignore NULLs).
+        Unused, removed item from layer context menu"""
         mapLayer = self.GetLayerInfo(self.layer_selected, key = 'maplayer')
-        
-        cmd = ['g.region',
+
+        cmd = ['g.region', 'raster=%s' % mapLayer.GetName(),
                'zoom=%s' % mapLayer.GetName()]
-        
+
         # print output to command log area
         self._giface.RunCmd(cmd, notification=Notification.NO_NOTIFICATION)
         



More information about the grass-commit mailing list