[GRASS-dev] [GRASS GIS] #1893: d.vect on re-opening switches to default layer

#1893: d.vect on re-opening switches to default layer
-------------------------+--------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: wxGUI | Version: svn-releasebranch64
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
Steps to reproduce:
  * add vector layer
  * specify layer to draw (i.e. 2 or -1)
  * apply & close dialog
  * go to layer properties (opens d.vect)
  * check layer - it is correct but in second is changed to default one (1
in 6.4)

This is rather annoying as imagine following workflow: add vector map,
select different layer (-1), change color and symbol. Close dialog. Decide
to again change color/symbol. Open properties, change color, click Apply
and KABOOM! Vectors are gone. Every time someone opens vector properties,
he has to remember to set back layer option too.

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

#1893: d.vect on re-opening switches to default layer
-------------------------+--------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: wxGUI | Version: svn-releasebranch64
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by annakrat):

Please try r55181.

Anna

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

#1893: d.vect on re-opening switches to default layer
-------------------------+--------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: wxGUI | Version: svn-releasebranch64
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by mlennert):

Replying to [comment:1 annakrat]:
> Please try r55181.

Works great for me.

Thanks !

Moritz

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

#1893: d.vect on re-opening switches to default layer
-------------------------+--------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: wxGUI | Version: svn-releasebranch64
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by mmetz):

Replying to [comment:2 mlennert]:
> Replying to [comment:1 annakrat]:
> > Please try r55181.
>
> Works great for me.
>

Does not work for me in all branches with a network generated with v.net.
1. Add a table to layer 2
2. Display layer 2 with attributes (just cats for testing), click OK: ok
3. Double-click on the layer in the lmgr, do nothing just click OK:
KABOOM! Vectors are gone, error:

{{{
Details: attrcol not specified, cannot display attributes
}}}

It might be easier to just hide the dialog and show it again (like for
decorations) on double-click or clock on Properties. The dialog then needs
to be destroyed when the layer is removed. Makes sense?

Markus M

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

#1893: d.vect on re-opening switches to default layer
-------------------------+--------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: wxGUI | Version: svn-releasebranch64
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by mlennert):

Replying to [comment:3 mmetz]:
> Replying to [comment:2 mlennert]:
> > Replying to [comment:1 annakrat]:
> > > Please try r55181.
> >
> > Works great for me.
> >
>
> Does not work for me in all branches with a network generated with
v.net.
> 1. Add a table to layer 2
> 2. Display layer 2 with attributes (just cats for testing), click OK: ok
> 3. Double-click on the layer in the lmgr, do nothing just click OK:
KABOOM! Vectors are gone, error:
>
> {{{
> Details: attrcol not specified, cannot display attributes
> }}}
>
> It might be easier to just hide the dialog and show it again (like for
decorations) on double-click or clock on Properties. The dialog then needs
to be destroyed when the layer is removed. Makes sense?

I see the issue. IIUC, it's due to llayer. But wouldn't it be enough to
apply a similar fix to llayer ?

Moritz

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

#1893: d.vect on re-opening switches to default layer
-------------------------+--------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: wxGUI | Version: svn-releasebranch64
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by mmetz):

Replying to [comment:4 mlennert]:
> Replying to [comment:3 mmetz]:
> > Replying to [comment:2 mlennert]:
> > > Replying to [comment:1 annakrat]:
> > > > Please try r55181.
> > >
> > > Works great for me.
> > >
> >
> > Does not work for me in all branches with a network generated with
v.net.
> > 1. Add a table to layer 2
> > 2. Display layer 2 with attributes (just cats for testing), click OK:
ok
> > 3. Double-click on the layer in the lmgr, do nothing just click OK:
KABOOM! Vectors are gone, error:
> >
> > {{{
> > Details: attrcol not specified, cannot display attributes
> > }}}
> >
> > It might be easier to just hide the dialog and show it again (like for
decorations) on double-click or clock on Properties. The dialog then needs
to be destroyed when the layer is removed. Makes sense?
>
> I see the issue. IIUC, it's due to llayer. But wouldn't it be enough to
apply a similar fix to llayer ?

No. You would need similar fixes for all column options as well. The
dialog should IMHO not be updated when showing properties because the user
did not update anything. IOW, the dialog and its options should only be
updated when they are really updated (changed by the user). Thus my
show/hide suggestion, which is already used for other dialogs.

Markus M

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

#1893: d.vect on re-opening switches to default layer
-------------------------+--------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: wxGUI | Version: svn-releasebranch64
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by annakrat):

Replying to [comment:5 mmetz]:
> Replying to [comment:4 mlennert]:
> > Replying to [comment:3 mmetz]:
> > > Replying to [comment:2 mlennert]:
> > > > Replying to [comment:1 annakrat]:
> > > > > Please try r55181.
> > > >
> > > > Works great for me.
> > > >
> > >
> > > Does not work for me in all branches with a network generated with
v.net.
> > > 1. Add a table to layer 2
> > > 2. Display layer 2 with attributes (just cats for testing), click
OK: ok
> > > 3. Double-click on the layer in the lmgr, do nothing just click OK:
KABOOM! Vectors are gone, error:
> > >
> > > {{{
> > > Details: attrcol not specified, cannot display attributes
> > > }}}
> > >
> > > It might be easier to just hide the dialog and show it again (like
for decorations) on double-click or clock on Properties. The dialog then
needs to be destroyed when the layer is removed. Makes sense?
> >
> > I see the issue. IIUC, it's due to llayer. But wouldn't it be enough
to apply a similar fix to llayer ?
>
> No. You would need similar fixes for all column options as well. The
dialog should IMHO not be updated when showing properties because the user
did not update anything. IOW, the dialog and its options should only be
updated when they are really updated (changed by the user). Thus my
show/hide suggestion, which is already used for other dialogs.

Actually, the show/hide is already there. I just removed the line which
updated the dialog.
The llayer option seems to be a different problem which I don't fully
understand. Only layer 1 is in the list.

Anna

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

#1893: d.vect on re-opening switches to default layer
-------------------------+--------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: wxGUI | Version: svn-releasebranch64
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by annakrat):

This could be related also to #2012. The dialog now is not updated when
shown. Can we close this ticket or is there something else?

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

#1893: d.vect on re-opening switches to default layer
--------------------------+-------------------------------------------------
  Reporter: marisn | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.3
Component: wxGUI | Version: svn-releasebranch64
Resolution: fixed | Keywords:
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by marisn):

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

Comment:

Yes, this issue now is fixed.

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