Skip to content

Comments

Fixed sytle selector on root layer in LayerTree#567

Closed
NullSeile wants to merge 1 commit intoqgis:masterfrom
bgeo-gis:fix-root-layer-style-selector
Closed

Fixed sytle selector on root layer in LayerTree#567
NullSeile wants to merge 1 commit intoqgis:masterfrom
bgeo-gis:fix-root-layer-style-selector

Conversation

@NullSeile
Copy link
Contributor

The style selector in the root layer had a bug in the recursive algorithm which made it not work. This pull request should fix it.

};
getLayerStyles = (layer) => {
return layer?.sublayers?.reduce((styleList, sublayer) => {
Object.assign(styleList, this.getLayerStyles(sublayer.sublayers));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A fix could be to just pass sublayer instead of sublayer.sublayers here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but we would loose any style information that the root layer has. I'm not sure if it can have any, but did it like this just to be sure.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory it cannot have any - the WMS root layer is not represented in the QGIS layer tree, and does indeed not correspond to a QGIS Project layer.

@manisandro
Copy link
Member

I've addressed this in a584cb7 - thanks for reporting!

@manisandro manisandro closed this Feb 17, 2026
@NullSeile
Copy link
Contributor Author

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants