[GRASS-SVN] r70227 - grass/branches/releasebranch_7_2/gui/wxpython/lmgr
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jan 3 11:54:13 PST 2017
Author: martinl
Date: 2017-01-03 11:54:12 -0800 (Tue, 03 Jan 2017)
New Revision: 70227
Modified:
grass/branches/releasebranch_7_2/gui/wxpython/lmgr/layertree.py
Log:
wxGUI/lmgr; remove duplicated variable (merge r70225 from trunk)
Modified: grass/branches/releasebranch_7_2/gui/wxpython/lmgr/layertree.py
===================================================================
--- grass/branches/releasebranch_7_2/gui/wxpython/lmgr/layertree.py 2017-01-03 19:52:26 UTC (rev 70226)
+++ grass/branches/releasebranch_7_2/gui/wxpython/lmgr/layertree.py 2017-01-03 19:54:12 UTC (rev 70227)
@@ -464,12 +464,6 @@
same = False
break
- # map layer items
- try:
- mltype = self.GetLayerInfo(self.layer_selected, key='type')
- except:
- mltype = None
-
if ltype not in ("group", "command"):
if numSelected == 1:
self.popupMenu.AppendSeparator()
@@ -521,7 +515,7 @@
id=self.popupID['zoom'])
# raster-specific zoom
- if mltype and mltype == "raster" and same:
+ if ltype and ltype == "raster" and same:
self.popupMenu.Append(
self.popupID['zoom1'], _("Zoom to selected map(s) (ignore NULLs)"))
self.Bind(
@@ -541,7 +535,7 @@
id=self.popupID['region'])
# vector layers (specific items)
- if mltype and mltype == "vector" and numSelected == 1:
+ if ltype and ltype == "vector" and numSelected == 1:
self.popupMenu.AppendSeparator()
item = wx.MenuItem(
self.popupMenu,
@@ -709,7 +703,7 @@
self.Bind(wx.EVT_MENU, self.OnMetadata, id=self.popupID['meta'])
# raster layers (specific items)
- elif mltype and mltype == "raster":
+ elif ltype and ltype == "raster":
self.popupMenu.AppendSeparator()
if numSelected == 1:
@@ -823,7 +817,7 @@
self.OnMetadata,
id=self.popupID['meta'])
- elif mltype and mltype == 'raster_3d':
+ elif ltype and ltype == 'raster_3d':
if numSelected == 1:
self.popupMenu.AppendSeparator()
self.popupMenu.Append(
@@ -858,7 +852,7 @@
id=self.popupID['meta'])
# web service layers (specific item)
- elif mltype and mltype == "wms":
+ elif ltype and ltype == "wms":
self.popupMenu.Append(
self.popupID['save_ws'],
text=_("Save web service layer"))
More information about the grass-commit
mailing list