[GRASS-dev] [GRASS GIS] #1882: new query display needs to update on mouse click

#1882: new query display needs to update on mouse click
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
The new query display is very nice. It is much more readable than previous
output.

But it needs to update each time you click on a new cell or feature.
Currently, you must close the display and click on a new cell/feature to
see the value of that cell/feature.

I assume that the plan is for it to update or maybe even accumulate values
so that you can see the result of multiple mouse clicks. But that part is
not working.

Michael

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

#1882: new query display needs to update on mouse click
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: query | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
Changes (by annakrat):

  * keywords: => query

Comment:

Updating on mouse click should already work. Maybe some problem on Mac
again? Is there any error?

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

#1882: new query display needs to update on mouse click
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: query | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

No error. Just no update.

Michael

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

#1882: new query display needs to update on mouse click
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: query | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by lucadelu):

Replying to [comment:1 annakrat]:
> Updating on mouse click should already work. Maybe some problem on Mac
again? Is there any error?

On Debian it is working well.

Luca

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

#1882: new query display needs to update on mouse click
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: query | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

We should see if it is out on Windows too or just Mac.

Michael

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

#1882: new query display needs to update on mouse click
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: query | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by hellik):

Replying to [comment:4 cmbarton]:
> We should see if it is out on Windows too or just Mac.

tested with

{{{
GRASS version: 7.0.svn
GRASS SVN Revision: 54994
Build Date: 2013-02-11
GIS Library Revision: 52468 (2012-07-27)
GDAL/OGR: 1.9.2
PROJ.4: 4.8.0
GEOS: 3.3.6dev
SQLite: 3.7.10
Python: 2.7.2
wxPython: 2.8.12.1
Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)
}}}

d.rast map=elevation

clicking on the map display, the output window pops up, but there is no
output value of queried raster.

Helmut

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

#1882: new query display needs to update on mouse click
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: query | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by annakrat):

I have fixed the problem on Windows already (r54995), it was related to
something different. So let's see tomorrow.

Anna

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

#1882: new query display needs to update on mouse click
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: query | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by hellik):

Replying to [comment:6 annakrat]:
> I have fixed the problem on Windows already (r54995), it was related to
something different. So let's see tomorrow.

ah, ok, I'll test it.

Helmut

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

#1882: new query display needs to update on mouse click
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: query | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

The query also does not show the coordinates of the cell clicked, at least
in my display. I'll see what it is like with a version tomorrow.

Michael

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

#1882: new query display needs to update on mouse click
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: query | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by annakrat):

Replying to [comment:8 cmbarton]:
> The query also does not show the coordinates of the cell clicked, at
least in my display. I'll see what it is like with a version tomorrow.
>
I added the coordinates in r55003.

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

#1882: new query display needs to update on mouse click
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: query | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by hellik):

Replying to [comment:6 annakrat]:
> I have fixed the problem on Windows already (r54995), it was related to
something different. So let's see tomorrow.

it works nicely with the latest osgeo4w-wingrass7-nightly build.

thanks
Helmut

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1882#comment:10&gt;
GRASS GIS <http://grass.osgeo.org>

#1882: new query display needs to update on mouse click
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: query | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

The coordinates show up fine but no update. If you can point me to the
relevant mouse binding code, I could see if I can fix it.

Michael

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1882#comment:11&gt;
GRASS GIS <http://grass.osgeo.org>

#1882: new query display needs to update on mouse click
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: query | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by annakrat):

Replying to [comment:11 cmbarton]:
> The coordinates show up fine but no update. If you can point me to the
relevant mouse binding code, I could see if I can fix it.
>

That would be great because I don't know what could be the problem. The
code doing the query is in mapdisp/frame.py in QueryMap method which is
called from Query method. This is called from mapdisp/mapwindow.py, line
1187. So I would put some prints and see where it is blocked.

Thanks,
Anna

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1882#comment:12&gt;
GRASS GIS <http://grass.osgeo.org>

#1882: new query display needs to update on mouse click
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: query | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

The important thing is that the query works. But it is not triggering an
update to the new query output window. Does that happen in the same Query
method? Or is it somewhere else?

Michael

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1882#comment:13&gt;
GRASS GIS <http://grass.osgeo.org>

#1882: new query display needs to update on mouse click
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: query | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by annakrat):

Replying to [comment:13 cmbarton]:
> The important thing is that the query works. But it is not triggering an
update to the new query output window. Does that happen in the same Query
method? Or is it somewhere else?
The update is in the QueryMap line 734:

{{{
         if self.dialogs['query']:
             self.dialogs['query'].Raise()
             self.dialogs['query'].SetData(result)
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1882#comment:14&gt;
GRASS GIS <http://grass.osgeo.org>

#1882: new query display needs to update on mouse click
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: query | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

Thanks. I'll take a look as soon as I can.

Michael

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1882#comment:15&gt;
GRASS GIS <http://grass.osgeo.org>

#1882: new query display needs to update on mouse click
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: query | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

It is in line 1187 of mapwindow.py

Change it from:

self.frame.Query(self.mouse['begin'][0],self.mouse['begin'][1])

to

self.frame.Query(self.mouse['end'][0],self.mouse['end'][1])

and it works fine. It should work fine on other platforms too, but you
should check.

Michael

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1882#comment:16&gt;
GRASS GIS <http://grass.osgeo.org>

#1882: new query display needs to update on mouse click
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: query | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

OK. So that didn't show up well when it formatted. I'll try again.

Change 'begin' to 'end' in line 1187.

{{{
self.frame.Query(self.mouse['begin'][0],self.mouse['begin'][1])
}}}

to

[[[
self.frame.Query(self.mouse['end'][0],self.mouse['end'][1])
]]]

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1882#comment:17&gt;
GRASS GIS <http://grass.osgeo.org>

#1882: new query display needs to update on mouse click
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: query | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

Oh well, hopefully you get the idea in spite of the formatting in Trak.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1882#comment:18&gt;
GRASS GIS <http://grass.osgeo.org>

#1882: new query display needs to update on mouse click
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: query | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by annakrat):

I changed it to the 'end' coordinates because it makes sense. However, I
still don't understand how it is connected to the update problem.

Anna

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1882#comment:19&gt;
GRASS GIS <http://grass.osgeo.org>