[GRASS-SVN] r65237 - grass/branches/releasebranch_7_0/gui/wxpython/lmgr

svn_grass at osgeo.org svn_grass at osgeo.org
Thu May 14 18:22:39 PDT 2015


Author: annakrat
Date: 2015-05-14 18:22:39 -0700 (Thu, 14 May 2015)
New Revision: 65237

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

Modified: grass/branches/releasebranch_7_0/gui/wxpython/lmgr/layertree.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/lmgr/layertree.py	2015-05-15 01:20:19 UTC (rev 65236)
+++ grass/branches/releasebranch_7_0/gui/wxpython/lmgr/layertree.py	2015-05-15 01:22:39 UTC (rev 65237)
@@ -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