Skip to content
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 not working when loading a qml #19136

Closed
qgib opened this issue Jun 29, 2014 · 8 comments
Closed

Value Map not working when loading a qml #19136

qgib opened this issue Jun 29, 2014 · 8 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Project

Comments

@qgib
Copy link
Contributor

qgib commented Jun 29, 2014

Author Name: Philipe Borba (@phborba)
Original Redmine Issue: 10752
Affected QGIS version: 2.4.0
Redmine category:project_loading/saving


I'm trying to load a style saved as a .qml but when I load it, the value map defined in the .qml is not loaded. I have already tried to save the style into the database, but when I tried to load it, the value maps also weren't loaded.

A sample database is attached, with a sample of .qml


@qgib
Copy link
Contributor Author

qgib commented Jun 29, 2014

Author Name: Jürgen Fischer (@jef-n)


  • category_id was configured as Project Loading/Saving

@qgib
Copy link
Contributor Author

qgib commented Jun 29, 2014

Author Name: Matthias Kuhn (@m-kuhn)


Does the following workaround to update the qml work for you?

  • Open layer/qml in 2.2
  • Save project
  • Open project in 2.4
  • Save qml in 2.4

  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Jul 8, 2014

Author Name: Philipe Borba (@phborba)


Unfortunately it didn't work. In the qml structure saved by 2.4, the parts of the xml code where the value lists were stored weren't generated. The only parts of the qml that were generated are those linked to simbology. For instance, in the qml saved in 2.2, I have this structure:

On the other hand, when I proceeded the way you instructed me, qgis 2.4 generates only this:

The type of the field is ommited and also the value pairs are gone.

If I manually set the value map, as it is show in the attached picture, then save the .qml, close qgis, reopen qgis and finally load the layer and the saved qml, the value map is not loaded and the problem with the code described above remains the same.


  • 7616 was configured as bug_qgis.JPG

@qgib
Copy link
Contributor Author

qgib commented Jul 15, 2014

Author Name: Philipe Borba (@phborba)


There is a similar explanation to this bug on this link:

http://gis.stackexchange.com/questions/104403/how-to-save-and-load-vector-layer-attribute-value-map-editable-state-in-qml-st

@qgib
Copy link
Contributor Author

qgib commented Jul 17, 2014

Author Name: Giovanni Manghi (@gioman)


isn't this a regression since 2.2?

@qgib
Copy link
Contributor Author

qgib commented Jul 17, 2014

Author Name: Paolo Cavallini (@pcav)


Duplicated in #19266?
It's a regression.


  • priority_id was changed from High to Severe/Regression

@qgib
Copy link
Contributor Author

qgib commented Sep 17, 2014

Author Name: Matthias Kuhn (@m-kuhn)


Fixed in changeset "e6a259d1806b756cb2a9d91d6c5546ce6d04e710".


  • status_id was changed from Feedback to Closed

@qgib
Copy link
Contributor Author

qgib commented Oct 4, 2014

Author Name: James Rogers (James Rogers)


Sorry, I have zero understanding when it comes to coding, etc.
I am having this same problem with the value map info not saving/loading in the qml. Matthias, I see you fixed this in some python code? How do I update my QGIS to fix this issue?
Thanks

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Project labels May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Project
Projects
None yet
Development

No branches or pull requests

1 participant