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

Importing style xml only works for symbols #113

Closed
dude1756 opened this issue Apr 21, 2020 · 9 comments · Fixed by #120
Closed

Importing style xml only works for symbols #113

dude1756 opened this issue Apr 21, 2020 · 9 comments · Fixed by #120
Labels
bug documentation Issues with the documentation of the plugin enhancement

Comments

@dude1756
Copy link

Hi there,

I have created a style xml file in QGIS that includes following sections:
<symbols>
colorramps/>
<textformats/>
<labelsettings>
If I install this xml file via resourceSharing plugin this file is copied to that path: %appdata%\QGIS\QGIS3\profiles\default\resource_sharing\collections\3121786cab29e00abe0c643c78fab504baafdfd0\symbol
However, when you look at QGIS style manager, only symbols are properly imported, none of the other styling settings (color, textformat, label).
Is there a way to achieve this?

Thanks!

@havatv
Copy link
Collaborator

havatv commented Apr 21, 2020

Thanks for reporting, @dude1756! I am not very familiar with that part of the code. Anyway, the documentation should be updated to describe current behaviour. And hopefully we will be able to support more aspects of styles some time in the future.

@havatv havatv added documentation Issues with the documentation of the plugin enhancement labels Apr 21, 2020
@dude1756
Copy link
Author

Thanks for your quick response. Looking at the code, I think colorramps are implemented but not working in my case. A bug?

@havatv
Copy link
Collaborator

havatv commented Apr 21, 2020

Thanks for your quick response. Looking at the code, I think colorramps are implemented but not working in my case. A bug?

It is very probable that this is a bug.
I think I have verified that symbol "import" through the Resource Sharing plugin works, but how would I know that colorramps and the other stuff work?
As you may understand, I don't know much about the style mechanisms in QGIS, so if you would like to investigate this, you are very welcome!

@havatv havatv added the bug label Apr 21, 2020
@havatv
Copy link
Collaborator

havatv commented Apr 21, 2020

I just created a test collection with a style-XML file containing only two colour ramps. After installing the collection using version 0.13.1 of the plugin, the colour ramps were available when clicking the "Color ramp" pulldown and choosing "All color ramps". Here is a screenshot of the style manager, where the colormaps (greens and spectral) show up under "Smart Groups" (!?).

image

Are you experiencing a different behaviour, @dude1756 ?

@havatv
Copy link
Collaborator

havatv commented Apr 22, 2020

Hi again!

PR #120 adds support for textformats and labelsettings. It would be great if you could download, install and test:
https://github.com/QGIS-Contribution/QGIS-ResourceSharing/archive/improve_style_support.zip

Here is a screenshot of the style manager that shows that all the four style elements will now become available.
image

@dude1756
Copy link
Author

Hey havatv, how cool is that - Thx. It's obviously working. In my case I have now 3 tags in the left panel, where 1st is empty, 2nd just contains symbols and 3rd all elements. Can you confirm that behaviour?

@havatv
Copy link
Collaborator

havatv commented Apr 22, 2020

@dude1756, as you can see from the screenshot above, I only have one tag for the collection. The behaviour you are observing indicates that there are tags there that are the result of previous collection installs.
Did you clean up the tags in Style Manager before installing the collection?
To remove a tag, right-click on it in the left part of the Style Manager, and choose Remove.
It may be an idea to also remove the style elements from the collection manually (select them in the right part of the Style Manager and click on the button with the red minus).

@dude1756
Copy link
Author

Ok, I've cleaned everything including cache and it works! Thanks a lot.

@havatv
Copy link
Collaborator

havatv commented Apr 22, 2020

Thanks again for reporting, @dude1756!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug documentation Issues with the documentation of the plugin enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants