[GRASS-SVN] r58250 - grass/trunk/gui/wxpython/lmgr
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Nov 18 05:40:12 PST 2013
Author: martinl
Date: 2013-11-18 05:40:11 -0800 (Mon, 18 Nov 2013)
New Revision: 58250
Modified:
grass/trunk/gui/wxpython/lmgr/layertree.py
Log:
wxGUI: check if export modules are available (vector contextual menu)
Modified: grass/trunk/gui/wxpython/lmgr/layertree.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/layertree.py 2013-11-18 00:26:00 UTC (rev 58249)
+++ grass/trunk/gui/wxpython/lmgr/layertree.py 2013-11-18 13:40:11 UTC (rev 58250)
@@ -467,10 +467,15 @@
self.Bind(wx.EVT_MENU, lambda x: self.lmgr.OnMenuCmd(cmd = ['v.out.ogr',
'input=%s' % mapLayer.GetName()]),
id = self.popupID['export'])
+ if 'v.out.ogr' not in globalvar.grassCmd:
+ self.popupMenu.Enable(self.popupID['export'], False)
+
self.popupMenu.Append(self.popupID['export-pg'], text = _("Export PostGIS"))
self.Bind(wx.EVT_MENU, lambda x: self.lmgr.OnMenuCmd(cmd = ['v.out.postgis',
'input=%s' % mapLayer.GetName()]),
id = self.popupID['export-pg'])
+ if 'v.out.postgis' not in globalvar.grassCmd:
+ self.popupMenu.Enable(self.popupID['export-pg'], False)
lmapset = self.GetLayerInfo(self.layer_selected, key = 'maplayer').GetMapset()
if lmapset != currentMapset:
More information about the grass-commit
mailing list