Opened 8 months ago

Last modified 8 months ago

#3778 new defect

where field in wxgui layer manager d.vect display missing value on workspace import

Reported by: balagates Owned by: grass-dev@…
Priority: normal Milestone:
Component: wxGUI Version: svn-releasebranch76
Keywords: d.vect where Cc:
CPU: OSX/Intel Platform: MacOSX

Description

In the WX d.vect Selection tab the "where" field is blank after importing a GXW workspace file containing a "where" value (example workspace vector parameters below). The preview of the d.vect command at the bottom of the window is also missing the "where" parameter. The other parameters in this workspace file (fill_color and icon) are displayed properly. The strange thing is the Map Display is using the "where" value in the workspace file even though it is not displayed in the WX d.vect properties. If I manually type in the same "where" value the WX d.vect works as expected. So this appears to be only a WX d.vect Selection display problem after import from a GXW workspace file.

        <layer type="vector" name="mrds_az@brett" checked="0" opacity="1.000000">
            <task name="d.vect">
                <parameter name="map">
                    <value>mrds_az@brett</value>
                </parameter>
                <parameter name="where">
                    <value>COMMOD1='Gold'</value>
                </parameter>
                <parameter name="fill_color">
                    <value>orange</value>
                </parameter>
                <parameter name="icon">
                    <value>basic/box</value>
                </parameter>
            </task>
        </layer>

I believe this worked fine in 7.4.1. I first noticed the problem in the 7.6.0 downloaded from the Grass site on my macOS 10.12.6.

Change History (1)

comment:1 Changed 8 months ago by balagates

I noticed in the layer manager when a line with a d.vect "where" parameter is selected the status bar shows the d.vect command including the "where" and other parameters. I also noticed that when you open a properties dialog (CmdPanel?) for that vector the d.vect command is also shown in the dialog windows status bar but the "where" parameter has been removed. Debugging I see the "where" parameter is in the get_cmd() thru the end of GUI.ParseCommand?() but it disappeared after the following code in ./gui_core/forms.py UpdateThread?.run() is run.

            pBind = self.task.get_param(uid, element='wxId', raiseError=False)
            if pBind:
                pBind['value'] = ''

This may not be a bug by itself but seems related. What I cannot find is a way for the "where" value imported by the Open Workspace to initialize the dialog "where" value. The value I expect is destroyed in the above code but maybe the initialization should happen elsewhere? As far as I can tell this aspect of the code has not changed since 7.4 and I thought this might have been working in 7.4 (not sure though). Other parameters such as "icon" are not affected. There appears to be special handling for SqlWhereSelect? type parameters.

Note: See TracTickets for help on using tickets.