[GRASS-dev] [GRASS GIS] #3619: G_OPT_DB_WHERE - non-functional 'table' icon in gui

#3619: G_OPT_DB_WHERE - non-functional 'table' icon in gui
------------------------+-------------------------
Reporter: pvanbosgeo | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone:
Component: Default | Version: svn-trunk
Keywords: | CPU: Unspecified
Platform: Linux |
------------------------+-------------------------
When a function has an G_OPT_DB_WHERE input parameter, and you open the
function's window, you'll have a text box with to the right an 'table'
icon (see e.g., points_where parameter in v.vect.stats). It seems to be
non-functional though. When I click it, I only get:

{{{

File "/usr/local/grass7/grass-7.5.svn/gui/wxpython/gui_core/gselect.py",
line 2745, in _onClick
     vectmap=self.vector_map,
AttributeError: 'SqlWhereSelect' object has no attribute 'vector_map'
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3619&gt;
GRASS GIS <https://grass.osgeo.org>

#3619: G_OPT_DB_WHERE - non-functional 'table' icon in gui
--------------------------+-------------------------
  Reporter: pvanbosgeo | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.4.2
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords:
       CPU: Unspecified | Platform: Linux
--------------------------+-------------------------
Changes (by martinl):

* component: Default => wxGUI
* milestone: => 7.4.2

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3619#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#3619: G_OPT_DB_WHERE - non-functional 'table' icon in gui
--------------------------+-----------------------
  Reporter: pvanbosgeo | Owner: martinl
      Type: defect | Status: assigned
  Priority: normal | Milestone: 7.4.2
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords:
       CPU: Unspecified | Platform: Linux
--------------------------+-----------------------
Changes (by martinl):

* status: new => assigned
* owner: grass-dev@… => martinl
* cc: grass-dev@… (added)

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3619#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#3619: G_OPT_DB_WHERE - non-functional 'table' icon in gui
--------------------------+-----------------------
  Reporter: pvanbosgeo | Owner: martinl
      Type: defect | Status: assigned
  Priority: normal | Milestone: 7.4.2
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords:
       CPU: Unspecified | Platform: Linux
--------------------------+-----------------------

Comment (by martinl):

In [changeset:"73114" 73114]:
{{{
#!CommitTicketReference repository="" revision="73114"
G_OPT_DB_WHERE - non-functional 'table' icon in gui, see #3619
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3619#comment:3&gt;
GRASS GIS <https://grass.osgeo.org>

#3619: G_OPT_DB_WHERE - non-functional 'table' icon in gui
--------------------------+-----------------------
  Reporter: pvanbosgeo | Owner: martinl
      Type: defect | Status: assigned
  Priority: normal | Milestone: 7.4.2
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords:
       CPU: Unspecified | Platform: Linux
--------------------------+-----------------------

Comment (by martinl):

This bug appears when you click on 'table' button before input vector map
is selected. Steps to reproduce (in this case show on G74:v.extract):

1. click on 'table' button (`where` option) -> reported traceback
  * fixed in r73114, error message "No vector map selected" appears
2. select input map (with no attributes attached)
  * error message "No table linked to layer <1>"
3. select input map with attributes attached
  * SQL Builder opens

Anyway G74:v.vect.stats has another problem with GUI dependencies which
needs to be fixed.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3619#comment:4&gt;
GRASS GIS <https://grass.osgeo.org>

#3619: G_OPT_DB_WHERE - non-functional 'table' icon in gui
--------------------------+-----------------------
  Reporter: pvanbosgeo | Owner: martinl
      Type: defect | Status: assigned
  Priority: normal | Milestone: 7.4.2
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords:
       CPU: Unspecified | Platform: Linux
--------------------------+-----------------------

Comment (by martinl):

In [changeset:"73118" 73118]:
{{{
#!CommitTicketReference repository="" revision="73118"
v.vect.stats: define gui dependencies, see #3619
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3619#comment:5&gt;
GRASS GIS <https://grass.osgeo.org>

#3619: G_OPT_DB_WHERE - non-functional 'table' icon in gui
--------------------------+-----------------------
  Reporter: pvanbosgeo | Owner: martinl
      Type: defect | Status: assigned
  Priority: normal | Milestone: 7.4.2
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords:
       CPU: Unspecified | Platform: Linux
--------------------------+-----------------------

Comment (by martinl):

In [changeset:"73119" 73119]:
{{{
#!CommitTicketReference repository="" revision="73119"
wxGUI forms: improve gui dependencies logic, see #3619
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3619#comment:6&gt;
GRASS GIS <https://grass.osgeo.org>

#3619: G_OPT_DB_WHERE - non-functional 'table' icon in gui
--------------------------+-----------------------
  Reporter: pvanbosgeo | Owner: martinl
      Type: defect | Status: assigned
  Priority: normal | Milestone: 7.4.2
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords:
       CPU: Unspecified | Platform: Linux
--------------------------+-----------------------

Comment (by martinl):

Also G74:v.vect.stats related issue should be fixed in trunk (r73118,
r73119). Testing welcome.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3619#comment:7&gt;
GRASS GIS <https://grass.osgeo.org>

#3619: G_OPT_DB_WHERE - non-functional 'table' icon in gui
--------------------------+-----------------------
  Reporter: pvanbosgeo | Owner: martinl
      Type: defect | Status: assigned
  Priority: normal | Milestone: 7.4.2
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords:
       CPU: Unspecified | Platform: Linux
--------------------------+-----------------------

Comment (by pvanbosgeo):

Problem fixed for me, thanks

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3619#comment:8&gt;
GRASS GIS <https://grass.osgeo.org>

Hi Moritz,

I am trying out your addon d.vect.colhist. One problem I encountered was that the 'table' button to define the 'WHERE' condition using the GUI was not working (initial reason I filed the bug report https://trac.osgeo.org/grass/ticket/3619). In the case of your addon, what is missing (to make this work) is the layer selector:

#%option G_OPT_V_FIELD
#%end

Adding that will also make the 'table' button work.

Cheers,

Paulo

#3619: G_OPT_DB_WHERE - non-functional 'table' icon in gui
--------------------------+-----------------------
  Reporter: pvanbosgeo | Owner: martinl
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.4.2
Component: wxGUI | Version: svn-trunk
Resolution: fixed | Keywords:
       CPU: Unspecified | Platform: Linux
--------------------------+-----------------------
Changes (by martinl):

* status: assigned => closed
* resolution: => fixed

Comment:

In [changeset:"73133" 73133]:
{{{
#!CommitTicketReference repository="" revision="73133"
G_OPT_DB_WHERE - non-functional 'table' icon in gui, closes #3619
         (merge r73114, r73118-73119 from trunk)
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3619#comment:9&gt;
GRASS GIS <https://grass.osgeo.org>