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

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Mar 30 09:48:58 EDT 2012


Author: martinl
Date: 2012-03-30 06:48:58 -0700 (Fri, 30 Mar 2012)
New Revision: 51199

Modified:
   grass/trunk/gui/wxpython/lmgr/layertree.py
Log:
wxGUI: fix context menu for vectors (external data, sql)


Modified: grass/trunk/gui/wxpython/lmgr/layertree.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/layertree.py	2012-03-30 12:57:26 UTC (rev 51198)
+++ grass/trunk/gui/wxpython/lmgr/layertree.py	2012-03-30 13:48:58 UTC (rev 51199)
@@ -390,7 +390,8 @@
                                                map = layer.GetName())
                     self.GetPyData(self.layer_selected)[0]['info'] = info
                 info = self.GetPyData(self.layer_selected)[0]['info']
-                if info and info['format'] == 'ogr,PostgreSQL':
+                if info and info['format'] != 'native' and \
+                        info['format'].split(',')[1] == 'PostgreSQL':
                     self.popupMenu.Append(self.popupID['sql'], text = _("SQL Spatial Query"))
                     self.Bind(wx.EVT_MENU, self.OnSqlQuery, id = self.popupID['sql'])
             



More information about the grass-commit mailing list