[GRASS-dev] [GRASS GIS] #1426: v.colors resetting vector display

#1426: v.colors resetting vector display
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: svn-trunk
Keywords: v.colors | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
v.colors seems to reset all vector settings to default. If you have set
the symbol type and size, for example, running v.colors resets it to a 5
point "x".

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

#1426: v.colors resetting vector display
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: svn-trunk
Keywords: v.colors | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by martinl):

I don't fully understand, eg.
{{{
d.vect bridges size=10 icon=basic/box
}}}
OK
{{{
v.colors bridges color=ryg
d.vect bridges size=10 icon=basic/box
}}}
OK

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

#1426: v.colors resetting vector display
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: svn-trunk
Keywords: v.colors | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

{{{
d.vect bridges size=10 icon=basic/box
}}}

OK

{{{
v.colors bridges color=ryg
}}}

Update display screen (without running d.vect again). size reverts to 5
and icon reverts to basic/x

Michael

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

#1426: v.colors resetting vector display
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: svn-trunk
Keywords: v.colors | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by martinl):

Replying to [comment:2 cmbarton]:

> Update display screen (without running d.vect again). size reverts to 5
and icon reverts to basic/x

are you referring to wxGUI or monitors ({{{d.mon}}})?

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

#1426: v.colors resetting vector display
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: svn-trunk
Keywords: v.colors | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

wxgui

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

#1426: v.colors resetting vector display
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: svn-trunk
Keywords: v.colors | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by martinl):

Replying to [comment:4 cmbarton]:
> wxgui

  * start wxgui
  * add vector map 'bridges' (no color table defined)
  * set size to '10' and icon to 'basic/box'
  * re-render, OK
  * launch `v.colors` and set color table to `byr`
  * re-render, OK, symbols are boxes with size of 10

Right?

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

#1426: v.colors resetting vector display
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: svn-trunk
Keywords: v.colors | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

Maybe it's happing if v.colors is run with rules=

This effect can be seen when setting color rules via colorrules.py

OnApply calls v.colors rules=[some rules], and then UpdateMap. When it
does, it resets all d.vect settings back to default except for the color.
If it is not v.colors. It is not UpdateMap that is causing this. The only
other command being run is v.colors rules=

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

#1426: v.colors resetting vector display
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: svn-trunk
Keywords: v.colors | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

The same effect happens in the preview window. This is copying the vector
layer command from the layer tree and then running v.colors rules=

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

#1426: v.colors resetting vector display
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: svn-trunk
Keywords: v.colors | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by annakrat):

Yes, I can see where the problem is. I'll fix it tomorrow.

Anna

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

#1426: v.colors resetting vector display
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: svn-trunk
Keywords: v.colors | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

Thanks Anna.

Michael

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

#1426: v.colors resetting vector display
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: svn-trunk
Keywords: v.colors | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by annakrat):

This bug happens when using GRASSRGB column instead of color table. It
should be fixed (r47891). Still I'm not sure if this is the problem you
mean.

Anna

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

#1426: v.colors resetting vector display
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: svn-trunk
Keywords: v.colors | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

I'll test the revision. Thanks. It seems like something in v.colors was
running d.vect -a and it shouldn't do that. It should simply set the
colors.

Michael

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

#1426: v.colors resetting vector display
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: svn-trunk
Keywords: v.colors | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by martinl):

Replying to [comment:11 cmbarton]:
> I'll test the revision. Thanks. It seems like something in v.colors was
running d.vect -a and it shouldn't do that. It should simply set the
colors.

`v.colors` cannot run `d.vect` itself, it' just modifying color table.
wxGUI wrapper runs `d.vect` for preview. Also note that `d.vect -a` is
required only for color rules stored in attribute table. If you set up
file-based color table, `d.vect` renders vector table colorized without
any flag.

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

#1426: v.colors resetting vector display
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: svn-trunk
Keywords: v.colors | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

This is fixed for the main display, though it would be nice if preview
also looked like the main display too. The only issue is that now, a 'no
color rules set' error is popping up when colorrules is launched and when
a field is selected to create color rules, even if the color rules
checkbox is not checked. Probably just needs a conditional for the error
check in CreatColorTable or to move the error check to another position.
Thanks much for the fix.

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

#1426: v.colors resetting vector display
----------------------------------+-----------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: v.colors, colorrules | Platform: Unspecified
      Cpu: Unspecified |
----------------------------------+-----------------------------------------
Changes (by martinl):

  * keywords: v.colors => v.colors, colorrules
  * component: Default => wxGUI

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

#1426: v.colors resetting vector display
--------------------------+-------------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Resolution: fixed | Keywords: v.colors, colorrules
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by cmbarton):

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

Comment:

I fixed the error message. The preview display is an enhancement request
for colorrules, not v.colors. So this is now fixed. Closing.

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