[GRASS-SVN] r73114 - grass/trunk/gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Aug 17 05:42:49 PDT 2018


Author: martinl
Date: 2018-08-17 05:42:49 -0700 (Fri, 17 Aug 2018)
New Revision: 73114

Modified:
   grass/trunk/gui/wxpython/gui_core/gselect.py
Log:
G_OPT_DB_WHERE - non-functional 'table' icon in gui, see #3619

Modified: grass/trunk/gui/wxpython/gui_core/gselect.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/gselect.py	2018-08-17 11:39:27 UTC (rev 73113)
+++ grass/trunk/gui/wxpython/gui_core/gselect.py	2018-08-17 12:42:49 UTC (rev 73114)
@@ -2711,6 +2711,7 @@
         """
         super(SqlWhereSelect, self).__init__(parent=parent, id=wx.ID_ANY)
         self.parent = parent
+        self.vector_map = None
 
         self.sqlField = wx.TextCtrl(parent=self, id=wx.ID_ANY,
                                     size=globalvar.DIALOG_TEXTCTRL_SIZE)
@@ -2741,6 +2742,8 @@
     def _onClick(self, event):
         from dbmgr.sqlbuilder import SQLBuilderWhere
         try:
+            if not self.vector_map:
+                raise GException(_('No vector map selected'))
             win = SQLBuilderWhere(parent=self,
                                   vectmap=self.vector_map,
                                   layer=self.vector_layer)



More information about the grass-commit mailing list