Selaa lähdekoodia

G_OPT_DB_WHERE - non-functional 'table' icon in gui, see https://trac.osgeo.org/grass/ticket/3619

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@73114 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 6 vuotta sitten
vanhempi
commit
aded7912ba
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. 3 0
      gui/wxpython/gui_core/gselect.py

+ 3 - 0
gui/wxpython/gui_core/gselect.py

@@ -2711,6 +2711,7 @@ class SqlWhereSelect(wx.Panel):
         """
         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 @@ class SqlWhereSelect(wx.Panel):
     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)