-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"value map" widget broken #17511
Comments
Author Name: Matthias Kuhn (@m-kuhn) Does this also happen in master? I just tested it there and this does not happen for me. |
Author Name: Giovanni Manghi (@gioman) on 2.1.0+git20131010+f49ea36~precise-ubuntugis1 does not work, is the fix newer than this revision? |
Author Name: Matthias Kuhn (@m-kuhn) I don't know of any fix. I was just surprised because it seemed to work for me today. Or maybe I'm doing it wrong? |
Author Name: Giovanni Manghi (@gioman) The widget should allow the user to choose by what is defined in the "description" column, but then write what is defined in the "value" column. |
Author Name: Matthias Kuhn (@m-kuhn) Works here. |
Author Name: Giovanni Manghi (@gioman) Matthias Kuhn wrote:
try the attached project and edit the values of the column "landuse" from the table of attributes. It should allow to choose the common tree name and then write the scientific name.
|
Author Name: Matthias Kuhn (@m-kuhn) You are right Giovanni. |
Author Name: Alvaro Huarte (@ahuarte47) Works here using your data with master and windows x86. Regards |
Author Name: Giovanni Manghi (@gioman) Alvaro Huarte wrote:
Hi Alvaro, thanks for looking into this issue. I just updated my qgis master and here it is still broken. If you open the attached project and try add a new polygon (or edit the "landuse" column of an existing one), when you selects the value of the "landuse" attribute you can choose between "cork oak" or "holm oak", then the widget should write into the table "quercus suber" or "quercus rotundifolia", but instead it writes "cork oak" or "holm oak". |
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Alvaro Huarte (@ahuarte47) Giovanni Manghi wrote:
Hi Giovanni, I already did just that. Now, I've also updated my master branch, and still saving good values. I use Windows XP/x86 + Qt 4.7.1. |
Author Name: Matthias Kuhn (@m-kuhn) Just a sidenote: One thing I would very much like to see is the porting of these widgets to the new API [1] This will make debugging and maintenance much easier. [1] http://blog.vitu.ch/10142013-1847/write-your-own-qgis-form-elements |
Author Name: Alvaro Huarte (@ahuarte47) Giovanni Manghi wrote:
When you say... ' - but instead it writes "cork oak" or "holm oak" - ', you mean the value written to the DBF table? or the values showed in the attribute table of QGIS? I'm talking about the values written in the file, right? I have noticed a strange behavior when I edit the attributes using the "Edit feature form" from the "Identify results form". |
Author Name: Alvaro Huarte (@ahuarte47) Hi all! This commit fix it: If we find the error that says Giovanni, I can finally make a PR |
Author Name: Giovanni Manghi (@gioman) I just updated my master and still see the issue: the value map is a 2 columns table, named "value" and "description". The dropdown show a list made of the entries in the "description" column but in the table (in the dbf of a shapefile) it should write the value in the "value" column. If the edits are done directly in the table of attributes the issue is clear. If using the "edit form" (from the identify dialog) then it seems to write thr right value, but if closing the dialog and identifying again it will show anyway the wrong value. |
Author Name: Alvaro Huarte (@ahuarte47) Giovanni Manghi wrote:
Sorry, it works fine here. I am using this single modification to avoid a bug in identify dialog (When just a new landuse value is selected in edit form, the identify dialog improperly rewrites the display field and also shows the new value not its description): Giovanni, you apply this change? If you did it, although it makes little sense, you may send me the following files?
Thanks for you patience :-) ! |
Author Name: Giovanni Manghi (@gioman) weird, is still broke here, see attached screencast.
|
Author Name: Alvaro Huarte (@ahuarte47) Hi Giovanni, thank you very much for this video. I think this pull solve the bug Kind Regards
|
Author Name: Alvaro Huarte (@ahuarte47) Giovanni Manghi wrote:
Hi Giovanni, maybe I've missed something, have you tried this? Alvaro |
Author Name: Giovanni Manghi (@gioman) Alvaro Huarte wrote:
Hi Alvaro, cheers! |
Author Name: Alvaro Huarte (@ahuarte47) Giovanni Manghi wrote:
Ok, I did not know if I'd left something to alert |
Author Name: Matthias Kuhn (@m-kuhn) Giovanni, any progress on this? |
Author Name: Giovanni Manghi (@gioman) Matthias Kuhn wrote:
Hi Matthias, these days I'm not able (lack of time, sleep deprivation) to manually apply patches, but if someone will commit Alvaro's patch I will be able to immediately after compile and test. |
Author Name: Matthias Kuhn (@m-kuhn) I don't know, if this PR really fixes the described problem. If I am not mistaken, this problem is related to the valuemap widget, while the code in the PR is related only to the identify results dialog. So I'd be happy if somebody could test this fix before it's being merged. I'm very tight in time as well at the moment. |
Author Name: Matthias Kuhn (@m-kuhn)
|
Author Name: Giovanni Manghi (@gioman) Matthias Kuhn wrote:
Hi Alvaro, it would be a problem (don't want to abuse of your availability) create an installer with this patch? |
Author Name: Alvaro Huarte (@ahuarte47) Giovanni Manghi wrote:
Hi Giovanni, no problem, I will build the installer soon |
Author Name: Alvaro Huarte (@ahuarte47) Giovanni Manghi wrote:
Done: When QGIS starts it is possible that a python error is showed. It is not related with this patch, it come from my installer. Alvaro |
Author Name: Giovanni Manghi (@gioman)
Hi Alvaro, many thanks for your time! I have tested your patched QGIS and unfortunately it is still not working.
|
Author Name: Alvaro Huarte (@ahuarte47)
Very weird! I follow step by step your video and It works fine here :-( One question about another issue: Thank you very much! |
Author Name: Giovanni Manghi (@gioman) Alvaro Huarte wrote:
at one point after closing the table and reopening it, i have seen the correct values (the ones defined in the "value" column of the map), but then after editing the table again they disappeared and instead the "description" value is shown. Then after this event I wasn't able anymore to see the correct values. Anyway in older qgis releases the substitution between the values in "description" and "value" was "on the fly", during the edition of the table and wasn't necessary to save and/or close the table to see the right values.
not sure, better ask in the dev mailing list thanks! |
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Alvaro Huarte (@ahuarte47) Giovanni Manghi wrote:
Uf, sorry, I missed, QGIS have to display descriptions, not the values, right? |
Author Name: Alvaro Huarte (@ahuarte47)
Hi Giovanni, I asked to dev list, thanks! |
Author Name: Jürgen Fischer (@jef-n) Fixed in changeset "48427e1877cdb762af14f31be85b984a490828e2".
|
Author Name: Giovanni Manghi (@gioman) Jürgen Fischer wrote:
it does not seems to work on the latest master.
|
Author Name: Alvaro Huarte (@ahuarte47) Hi, I proposed a slightly different change: Best Regards |
Author Name: Jürgen Fischer (@jef-n) Giovanni Manghi wrote:
hm, works fine for me. If I change select a different description in the form and save that, the description also changes in the identify results. All cork oaks now. |
Author Name: Jürgen Fischer (@jef-n)
|
Author Name: Giovanni Manghi (@gioman) Jürgen Fischer wrote:
I'm preparing a screencast to show the issue and to show how it worked in qgis 1.8
|
Author Name: Jürgen Fischer (@jef-n)
|
Author Name: Giovanni Manghi (@gioman) Jürgen Fischer wrote:
attached a screencast that shows the difference between qgis 1.8 and 2.0/master: in qgis 1.8 the user can choose the attribute using a dropdown that shows what is defined in the column description of the value map, but qgis then writes (and immediately shows) what is found in the column *value" of the value map. in qgis 2.0/master the user choose the attribute using a dropdown that shows what is defined in the column description of the value map, but qgis then shows what is found in the same *description" of the value map. As you can see from the screencast qgis 2.0/master actually writes in the column what is found in the column *value" of the value map, but that's not the (only) point, the right/expected behaviour is the one that the users used to see in qgis 1.8, the user choose by "description" and qgis writes/presents what is found in "value". Please note that in both qgis 1.8/2.0(master) the identify shows the attribute as the one defined in the column description of the value map, and to me is wrong as it should show anyway what is defined in the column value of the value map. http://www.faunalia.eu/~gmanghi/qgis_tracker/value_map.mp4
|
Author Name: Jürgen Fischer (@jef-n) Giovanni Manghi wrote:
I'd consider that a bug in 1.8. The attribute table shows the descriptions of value maps when you open it (unfortunately the sample data use in the screencast initially contains values outside of the map - so that doesn't show). So I think that shouldn't change if you change a value. You should be able to select a different entry by description, get the corresponding value in the data and also see the corresponding description in the attribute table (as in all other rows). 2.0 does that, apparently 1.8 didn't. The stored data is correct in both cases, isn't it?
That is the intended behaviour. The point of the value maps is to enable the user to work with descriptions without having to know the values. |
Author Name: Giovanni Manghi (@gioman) Jürgen Fischer wrote:
yes. I'm not sure (still thinking) that the actual behavior is better for the user, but anyway if it is by design then there is no issue. All the confusion then arise because we (me and many others) assumed that the right behavior was the one observed in qgis 1.8. If the design is to never show the value of the "value" column of the map then it is right.
what about if the user uses the column in a field calculator expression? is used the "description" or the "value"? |
Author Name: Jürgen Fischer (@jef-n) Giovanni Manghi wrote:
Why should a changed field show the value and all other rows the description - and if closed and reopened show the description again?
The value. But a function that produces the description from the value would probably be helpful for such things.
|
Author Name: matteo ghetta (@ghtmtt) Hi, I have the same problem reported by Giovanni in the 2.5 version.
|
Author Name: Alvaro Huarte (@ahuarte47) matteo ghetta wrote:
Hi, see the comment (#17511 (comment)) by Jürgen Fischer: "The point of the value maps is to enable the user to work with descriptions without having to know the values", the old behavior can be considered a bug in 1.8. Best regards
|
Author Name: Alvaro Huarte (@ahuarte47)
|
Author Name: Matthias Kuhn (@m-kuhn)
|
Author Name: Giovanni Manghi (@gioman)
Original Redmine Issue: 8818
Affected QGIS version: master
Redmine category:vectors
The "value map" widget always write the "description" field instead of the "value" one as expected.
Is a regression since 1.8.
The text was updated successfully, but these errors were encountered: