[GRASS-dev] [GRASS GIS] #3204: Profile tool lacks a stop profiling entry in right mouse button

#3204: Profile tool lacks a stop profiling entry in right mouse button
-------------------------+---------------------------------
Reporter: milenan | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.2.0
Component: wxGUI | Version: svn-releasebranch72
Keywords: profile | CPU: Unspecified
Platform: MSWindows 8 |
-------------------------+---------------------------------
I was not able to stop profiling a raster map even if I was trying to
profile another raster map after having closed the profile tool.
I was not able to stop the profile tool at all, nor erase the lines from
the map display.

The best solution would be to add a "stop profiling" entry in right mouse
button as found in other GIS.

Additionally, in the console the following warning is shown:
{{{
C:\Program Files\GRASS GIS 7.2.svn\Python27\lib\site-
packages\wx-2.8-msw-unicode\wx\lib\plot.py:1164:
FutureWarning: comparison to `None` will result in an
elementwise object comparison in the future.
   if xAxis == None or yAxis == None:
}}}

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

#3204: Profile tool lacks a stop profiling entry in right mouse button
--------------------------+---------------------------------
  Reporter: milenan | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.0
Component: wxGUI | Version: svn-releasebranch72
Resolution: | Keywords: profile
       CPU: Unspecified | Platform: MSWindows 8
--------------------------+---------------------------------

Comment (by annakrat):

Replying to [ticket:3204 milenan]:
> I was not able to stop profiling a raster map even if I was trying to
profile another raster map after having closed the profile tool.
> I was not able to stop the profile tool at all, nor erase the lines from
the map display.
>
> The best solution would be to add a "stop profiling" entry in right
mouse button as found in other GIS.
>
Please describe the exact steps, I don't have any problems with this, at
least on Ubuntu.

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

#3204: Profile tool lacks a stop profiling entry in right mouse button
--------------------------+---------------------------------
  Reporter: milenan | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.0
Component: wxGUI | Version: svn-releasebranch72
Resolution: | Keywords: profile
       CPU: Unspecified | Platform: MSWindows 8
--------------------------+---------------------------------

Comment (by neteler):

The profile tool seems to work ok on Linux. Can another Windows user
please make a test?

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

#3204: Profile tool lacks a stop profiling entry in right mouse button
--------------------------+---------------------------------
  Reporter: milenan | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.0
Component: wxGUI | Version: svn-releasebranch72
Resolution: | Keywords: profile
       CPU: Unspecified | Platform: MSWindows 8
--------------------------+---------------------------------

Comment (by hellik):

Replying to [comment:2 neteler]:
> The profile tool seems to work ok on Linux. Can another Windows user
please make a test?

tested with

{{{
System Info
GRASS Version: 7.3.svn
GRASS SVN revision: r69793
Build date: 2016-11-10
Build platform: x86_64-w64-mingw32
GDAL: 2.1.2
PROJ.4: 4.9.3
GEOS: 3.5.0
SQLite: 3.14.1
Python: 2.7.5
wxPython: 2.8.12.1
Platform: Windows-8-6.2.9200 (OSGeo4W)
}}}

{{{
Traceback (most recent call last):
   File "C:\OSGEO4~1\apps\grass\grass-7.3.svn\gui\wxpython\ma
pdisp\frame.py", line 1135, in OnProfile

self.Profile(rasters=rasters)
   File "C:\OSGEO4~1\apps\grass\grass-7.3.svn\gui\wxpython\ma
pdisp\frame.py", line 1143, in Profile

controller=self.profileController)
   File "C:\OSGEO4~1\apps\grass\grass-7.3.svn\gui\wxpython\wx
plot\profile.py", line 58, in __init__

BasePlotFrame.__init__(self, parent=parent, size=size,
**kwargs)
   File "C:\OSGEO4~1\apps\grass\grass-7.3.svn\gui\wxpython\wx
plot\base.py", line 111, in __init__

self.client = plot.PlotCanvas(self)
NameError
:
global name 'plot' is not defined
}}}

IIRC there is already a ticket for this (?).

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

#3204: Profile tool lacks a stop profiling entry in right mouse button
--------------------------+---------------------------------
  Reporter: milenan | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.0
Component: wxGUI | Version: svn-releasebranch72
Resolution: | Keywords: profile
       CPU: Unspecified | Platform: MSWindows 8
--------------------------+---------------------------------

Comment (by hellik):

Replying to [comment:3 hellik]:
>
> IIRC there is already a ticket for this (?).

yes: #3094

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

#3204: Profile tool lacks a stop profiling entry in right mouse button
--------------------------+---------------------------------
  Reporter: milenan | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.0
Component: wxGUI | Version: svn-releasebranch72
Resolution: | Keywords: profile
       CPU: Unspecified | Platform: MSWindows 8
--------------------------+---------------------------------

Comment (by neteler):

Since #3094 is fixed, can you try again on Windows with a recent snapshot?

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

#3204: Profile tool lacks a stop profiling entry in right mouse button
--------------------------+---------------------------------
  Reporter: milenan | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.0
Component: wxGUI | Version: svn-releasebranch72
Resolution: | Keywords: profile
       CPU: Unspecified | Platform: MSWindows 8
--------------------------+---------------------------------

Comment (by hellik):

Replying to [comment:5 neteler]:
> Since #3094 is fixed, can you try again on Windows with a recent
snapshot?

#fixed some issues around the wxplot mechanism.

it doesn't handle the original subject of the report ''Profile tool lacks
a stop profiling entry in right mouse button''.

if you right click during profiling a raster, you get ''Copy coordinates
to clipboard'' etc, but you can't finish profiling.

the workflow is to switch to the ''GRASS profile analysis tool window''
and finish there the profiling session.

so it may be more an enhancement ticket(?).

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

#3204: Profile tool lacks a stop profiling entry in right mouse button
--------------------------+---------------------------------
  Reporter: milenan | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.0
Component: wxGUI | Version: svn-releasebranch72
Resolution: | Keywords: profile
       CPU: Unspecified | Platform: MSWindows 8
--------------------------+---------------------------------

Comment (by marisn):

Although I do not see an issue of stopping profiling tool by closing it
(fixed?), I have to agree that it is impossible to stop profiling tool
while its window is open. Every click, double click or right click on the
map canvas results in a continuation of profile line.

One of options to consider would be turning icon entitled "Draw transect
in map display" into a toggle button (one having "on" and "off" states).
Of course stopping profiling with either right or double click should work
together with such toggle button.

{{{
GRASS version: 7.3.svn
GRASS SVN revision: r69822M
Build date: 2016-11-14
Build platform: x86_64-pc-linux-gnu
GDAL: 2.0.2
PROJ.4: 4.9.2
GEOS: 3.5.0
SQLite: 3.15.1
Python: 2.7.12
wxPython: 3.0.2.0
}}}

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

#3204: Profile tool lacks a stop profiling entry in right mouse button
--------------------------+---------------------------------
  Reporter: milenan | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.1
Component: wxGUI | Version: svn-releasebranch72
Resolution: | Keywords: profile
       CPU: Unspecified | Platform: MSWindows 8
--------------------------+---------------------------------
Changes (by annakrat):

* milestone: 7.2.0 => 7.2.1

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