[GRASS-dev] [GRASS GIS] #74: v.digit option to set background colour doesn't work

#74: v.digit option to set background colour doesn't work
-----------------------+----------------------------------------------------
Reporter: craigleat | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: minor | Milestone: 6.3.0
Component: default | Version: svn-trunk
Keywords: v.digit |
-----------------------+----------------------------------------------------
It appears that the v.digit option: settings -> Symbology -> Background is
broken, because I am unable to change the background colour. A further
annoyance is that the background colour changes from white to cyan
whenever a background vector is added. If a raster is added the background
stays white.

Tested with Spearfish.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/74&gt;
GRASS GIS <http://grass.osgeo.org>
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/

#74: Tcl version of v.digit's background colour doesn't work
------------------------+---------------------------------------------------
  Reporter: craigleat | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: minor | Milestone: 6.3.0
Component: default | Version: svn-trunk
Resolution: | Keywords: v.digit, Tcl
------------------------+---------------------------------------------------
Changes (by hamish):

  * keywords: v.digit => v.digit, Tcl
  * summary: v.digit option to set background colour doesn't work => Tcl
              version of v.digit's background colour doesn't
              work

Comment:

Confirmed.

It's not just vector backdrop maps which turn the background color cyan,
"d.grid 5000" does it too.

Hamish

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/74#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/

#74: Tcl version of v.digit's background colour doesn't work
------------------------+---------------------------------------------------
  Reporter: craigleat | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: minor | Milestone: 6.3.0
Component: default | Version: svn-trunk
Resolution: | Keywords: v.digit, Tcl
------------------------+---------------------------------------------------
Comment (by hamish):

raster maps do turn the background cyan if you use the -o overlay flag
with d.rast.

Hamish

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/74#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/

GRASS GIS wrote:

#74: Tcl version of v.digit's background colour doesn't work
------------------------+---------------------------------------------------
  Reporter: craigleat | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: minor | Milestone: 6.3.0
Component: default | Version: svn-trunk
Resolution: | Keywords: v.digit, Tcl
------------------------+---------------------------------------------------
Comment (by hamish):

raster maps do turn the background cyan if you use the -o overlay flag
with d.rast.

I think I've fixed this with r30805.

--
Glynn Clements <glynn@gclements.plus.com>

#74: Tcl version of v.digit's background colour doesn't work
------------------------+---------------------------------------------------
  Reporter: craigleat | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: closed
  Priority: minor | Milestone: 6.3.0
Component: default | Version: svn-trunk
Resolution: fixed | Keywords: v.digit, Tcl
------------------------+---------------------------------------------------
Changes (by neteler):

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

Comment:

Fixed by Glynn with r30805. Also backported to 6.3.0-relbranch.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/74#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/

#74: Tcl version of v.digit's background colour doesn't work
------------------------+---------------------------------------------------
  Reporter: craigleat | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: reopened
  Priority: minor | Milestone: 6.3.0
Component: default | Version: svn-trunk
Resolution: | Keywords: v.digit, Tcl
------------------------+---------------------------------------------------
Changes (by hamish):

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

Comment:

Glynn:
> I think I've fixed this with r30805.

The background color is now white, but changing the background color from
the Setting window Symbology tab (1st item) still doesn't work as
expected.

With r30810 (just committed) it now respects the bg color, but only if you
add a background command like 'd.grid 5000'. I also notice that you can't
turn off background commands once created, unchecking their tick boxes has
no visible effect, once rendered. (if not yet rendered it won't draw it if
unticked)
To make the bg cmd go away you need to fully delete the command text.
(putting a # at the start of the line could work too? but not well)

Hamish

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/74#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/

GRASS GIS wrote:

#74: Tcl version of v.digit's background colour doesn't work

Changes (by hamish):

With r30810 (just committed) it now respects the bg color, but only if you
add a background command like 'd.grid 5000'.

Right. A simple (but inefficient) solution would be to add a d.erase
command at the beginning of the list.

It should be possible to set the canvas background colour with:

  .screen.canvas configure -bg <color>

I also notice that you can't
turn off background commands once created, unchecking their tick boxes has
no visible effect, once rendered. (if not yet rendered it won't draw it if
unticked)

The background should be re-calculated whenever a full redraw occurs,
e.g. if you change the zoom or click the redraw button.

--
Glynn Clements <glynn@gclements.plus.com>

#74: Tcl version of v.digit's background colour doesn't work
------------------------+---------------------------------------------------
  Reporter: craigleat | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: reopened
  Priority: minor | Milestone: 6.4.0
Component: default | Version: svn-trunk
Resolution: | Keywords: v.digit, Tcl
------------------------+---------------------------------------------------
Changes (by hamish):

  * milestone: 6.3.0 => 6.4.0

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/74#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/

#74: Tcl version of v.digit's background colour doesn't work
--------------------------+-------------------------------------------------
  Reporter: craigleat | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: closed
  Priority: minor | Milestone: 6.4.0
Component: default | Version: svn-trunk
Resolution: worksforme | Keywords: v.digit, Tcl
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by cmbarton):

  * status: reopened => closed
  * platform: => Unspecified
  * resolution: => worksforme
  * cpu: => Unspecified
* cc: hamish_nospam@yahoo.com (added)

Comment:

I've just tested in 15-08-08 SVN develbranch_6. All of these problems seem
to be fixed, at least in the Mac version. I have some odd mouse behavior (
middle-click acting like right-click), but that could be a function of
using TclTk 8.5 aqua. Could you please check and see if we can close this?

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

#74: Tcl version of v.digit's background colour doesn't work
--------------------------+-------------------------------------------------
  Reporter: craigleat | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: reopened
  Priority: minor | Milestone: 6.4.0
Component: default | Version: svn-trunk
Resolution: | Keywords: v.digit, Tcl
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by craigleat):

  * status: closed => reopened
* cc: hamish_nospam@yahoo.com (removed)
  * resolution: worksforme =>

Comment:

Hamish:
>it now respects the bg color, but only if you add a background command
like 'd.grid 5000'
Agreed. The bg colour reverts to white if the bg command is
disabled/removed.

Hamish:
>I also notice that you can't turn off background commands once created
No, the toggle button works for me. Prefixing the command with a # also
works.

Michael:
>I have some odd mouse behavior (middle-click acting like right-click)
My mouse clicks work as expected.

Tested with GRASS 6.4 revision 32853 of 18 Aug 2008, Ubuntu 7.10 and Tcl
8.4.

Craig

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

#74: Tcl version of v.digit's background colour doesn't work
--------------------------+-------------------------------------------------
  Reporter: craigleat | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: reopened
  Priority: minor | Milestone: 6.4.0
Component: default | Version: svn-trunk
Resolution: | Keywords: v.digit, Tcl
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by hamish):

Replying to [comment:7 craigleat]:

> Hamish:
> > I also notice that you can't turn off background commands once created

craigleat:
> No, the toggle button works for me. Prefixing the command with a # also
works.

s/turn off/remove/

Hamish

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

#74: Tcl version of v.digit's background colour doesn't work
--------------------------+-------------------------------------------------
  Reporter: craigleat | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: reopened
  Priority: minor | Milestone: 6.4.0
Component: default | Version: svn-trunk
Resolution: | Keywords: v.digit, Tcl
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by cmbarton):

* cc: glynn@gclements.plus.com (added)

Comment:

I don't understand the 's/turn off/remove/'

I just checked again. I have no problem with the background color settings
on my Mac with the current GRASS 6.4 compiled from the SVN develbranch_6.
The vector itself is in the first "background", but that shouldn't be
turned off of course. Glynn revamped the code so as to use a TclTk canvas
instead of an xwin. Maybe he can look at this too. It seems OK to me
though.

Michael

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

#74: Tcl version of v.digit's background colour doesn't work
--------------------------+-------------------------------------------------
  Reporter: craigleat | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: reopened
  Priority: minor | Milestone: 6.4.0
Component: default | Version: svn-trunk
Resolution: | Keywords: v.digit, Tcl
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by craigleat):

Michael:
>I have no problem with the background color settings on my Mac
A TclTk bug perhaps? I have the problem with TclTk 8.4, but it works for
Michael who is using TclTk 8.5.

Craig

PS This is a minor bug, maybe we just live with it and add a note to the
manual page.

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

#74: Tcl version of v.digit's background colour doesn't work
--------------------------+-------------------------------------------------
  Reporter: craigleat | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: reopened
  Priority: minor | Milestone: 6.4.0
Component: default | Version: svn-trunk
Resolution: | Keywords: v.digit, Tcl
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by glynn):

In r32876, the canvas' background colour is updated whenever the
background setting changes.

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

#74: Tcl version of v.digit's background colour doesn't work
--------------------------+-------------------------------------------------
  Reporter: craigleat | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: closed
  Priority: minor | Milestone: 6.4.0
Component: default | Version: svn-trunk
Resolution: worksforme | Keywords: v.digit, Tcl
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by craigleat):

  * status: reopened => closed
* cc: hamish_b@yahoo.com (added)
  * resolution: => worksforme

Comment:

Well done Glynn and thanks. It works correctly now (for me at least). I'll
allow Hamish to test further and resolve as 'fixed'.

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