Opened 15 years ago

Last modified 14 years ago

#1631 reopened bug

v.db.addcol: table not updated

Reported by: pcav Owned by: nobody
Priority: major: does not work as expected Milestone: Version 1.7.0
Component: GRASS Version: Trunk
Keywords: Cc: neteler
Must Fix for Release: No Platform: All
Platform Version: Awaiting user input: no

Description

When adding a column, the table is not updated in the canvas, until the user remove it from the canvas and reload it again. A dynamic update is obviously preferrable.

Change History (11)

comment:1 by rblazek, 15 years ago

The problem is how to get the signal that the table was modified. Hardcoding check for v.db.addcol in the GRASS plugin is awful. In addition I think that reload table can be useful (or even layer, note however that GRASS geometry for example, is updated whenever it is changed) for all vectors in QGIS and for more situations (data edited from other clients). So I would suggest 'wontfix' and add a new ticket with request to add 'reload button' to the QGIS table.

Radim

comment:2 by rblazek, 15 years ago

I forgot to say that also the 'add column' function can be of general use for all QGIS vectors and thus it should be added to QGIS and possibly removed from GRASS plugin. That whould also resolve the problem to get the signal that a column was added.

Radim

comment:3 by pcav, 15 years ago

Resolution: wontfix
Status: newclosed

See #1659

comment:4 by rblazek, 14 years ago

Resolution: wontfix
Status: closedreopened

in reply to:  3 comment:5 by lutra, 14 years ago

Replying to pcav:

See #1659

if fixing #1659 will show newly added columns than is ok... this bug hurts a lot! :)

comment:6 by rblazek, 14 years ago

There are 2 problems here:

1) GRASS modules do not call Vect_set_db_updated: http://trac.osgeo.org/grass/ticket/982

2) AFAIK currently there is no way to let know vector layer from provider that the data has changed. It seems quite easy to add dataModified signal to provider and connect it in layer to setModified. The GRASS provider could emit the signal at the end of QgsGrassProvider::loadAttributes then.

comment:7 by lutra, 14 years ago

Milestone: Version 1.0.3Version 1.5.0
Priority: minor: annoyancemajor: does not work as expected

Damn, I didn't realized that fixing this would have been that hard. Meanwhile I'll change the priority, (new) users when they see this remain pretty disappointed.

in reply to:  6 ; comment:8 by neteler, 14 years ago

Cc: neteler added

Replying to rblazek:

There are 2 problems here:

1) GRASS modules do not call Vect_set_db_updated: http://trac.osgeo.org/grass/ticket/982

I am willing to fix this in GRASS (for 6.4.0 and later) but need to know which modules to modify.

Markus

in reply to:  8 comment:9 by neteler, 14 years ago

Replying to rblazek:

There are 2 problems here:

1) GRASS modules do not call Vect_set_db_updated: http://trac.osgeo.org/grass/ticket/982

Question: would a "touch /path/to/vector/mapname/dbln" be sufficient to indicate the dbln file as updated?

comment:10 by rblazek, 14 years ago

Yes, touch would work but:

  • Is it portable? I think that it is always better to avoid UNIX specific commands even if it is already requirement.
  • It is maybe better to keep functionality in one place. An option can be added to v.db.connect, Vect_set_db_updated() called form v.db.connect and v.db.connect called from scripts.

comment:11 by pcav, 14 years ago

Milestone: Version 1.5.0Version 1.6.0
Note: See TracTickets for help on using tickets.