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 , 15 years ago
comment:2 by , 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:4 by , 14 years ago
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
comment:5 by , 14 years ago
follow-up: 8 comment:6 by , 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 , 14 years ago
Milestone: | Version 1.0.3 → Version 1.5.0 |
---|---|
Priority: | minor: annoyance → major: 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.
follow-up: 9 comment:8 by , 14 years ago
Cc: | 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
comment:9 by , 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 , 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 , 14 years ago
Milestone: | Version 1.5.0 → Version 1.6.0 |
---|
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