Feature request #5115
Save more than one style in a .qml file and give user a choice when loading the layer
Status: | Open | ||
---|---|---|---|
Priority: | Low | ||
Assignee: | - | ||
Category: | Symbology | ||
Pull Request or Patch supplied: | No | Resolution: | |
Easy fix?: | No | Copied to github as #: | 14875 |
Description
Someone might be interested in this:
I saw a request for another desktop GIS for the ability to save multiple symbology files for a layer (with a suffix after the layer name so they have unique file names). When loading the layer the different symbologies would be automatically detected and the user given a choice of which style to use.
Saving each symbology in a separate file doesn't seem very good to me because it risks naming conflicts (i.e. there might be other layers with the same file name plus a suffix). I think a better solution would be to save multiple symbologies in the same file. The downside of this would be that you couldn't just copy for another layer the .qml for a single style.
History
#1 Updated by Giovanni Manghi over 12 years ago
- Target version set to Version 2.0.0
#2 Updated by Pirmin Kalberer about 12 years ago
- Target version changed from Version 2.0.0 to Future Release - Nice to have
#3 Updated by Alister Hood almost 12 years ago
Someone might be interested in this:
I saw a request for another desktop GIS for the ability to save multiple symbology files for a layer (with a suffix after the layer name so they have unique file names). When loading the layer the different symbologies would be automatically detected and the user given a choice of which style to use.
Saving each symbology in a separate file doesn't seem very good to me because it risks naming conflicts (i.e. there might be other layers with the same file name plus a suffix). I think a better solution would be to save multiple symbologies in the same file. The downside of this would be that you couldn't just copy for another layer the .qml for a single style.
Saving multiple styles in the same .qml file would probably also imply deeper integration of this feature into QGIS, not just the ability to choose a symbology when you load the layer:
- multiple styles[*] for a layer would also be saved in the project file.
- they would be listed in the layer properties, allowing you to switch between them easily. Maybe when you right-click on a layer in the "layers" panel (aka TOC) there could also be a submenu which lists the styles, and you could switch quickly that way.
- there should be a mechanism to choose which layer style to use in a composer map, so you can use different styles in different maps, without having to switch rules on or off every time you view a map, or add a layer to the project multiple times.
[*] another name like "themes" is probably needed, because when you use e.g. the rule-based renderer you really have a collection of styles, one for each rule.
#4 Updated by Médéric RIBREUX almost 9 years ago
- Status changed from Open to Feedback
- % Done changed from 0 to 50
Hello, bug triage...
multi-style for layers is completely implemented in QGIS 2.13 master (and in previous versions).
For the moment, you can only save a style per QML. Perhaps is it time to implement multi-style QML saving/loading ? I think this is not so trivial for the UI because we need to let the users decide to save styles on an individual or grouped basis (sometimes, I just want to export a single style from my multi-style layer, some other times, I want to export two or three styles simultaneously).
#5 Updated by Giovanni Manghi over 7 years ago
- Easy fix? set to No
#6 Updated by Alister Hood almost 6 years ago
- Status changed from Feedback to Open
- Description updated (diff)
There isn't actually any feedback required as far as I can tell.