浏览代码

wxGUI: fix context menu for vectors (external data, sql)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@51199 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 13 年之前
父节点
当前提交
4b477a1ca9
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      gui/wxpython/lmgr/layertree.py

+ 2 - 1
gui/wxpython/lmgr/layertree.py

@@ -390,7 +390,8 @@ class LayerTree(treemixin.DragAndDrop, CT.CustomTreeCtrl):
                                                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'])