You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to update the label of a layer depending on selected features on another layer, based on their spatial relationship. The map canvas refreshes automatically only if both layers are labeled.
Steps to reproduce the issue
Let's take two layers, "commune" and "region", that have features overlapping. And I want to label "region" depending on whether an overlapped "commune" is selected. I'm using:
with_variable(
'containedcommunes'
overlay_contains('commune', @feature)
case
when array_contains(array_foreach(@containedcommunes, is_selected('commune', @element)), 'true')
then "nom_officiel"
else "code_siren"
end
)
When I select a feature in "commune":
if the commune layer has labeling enabled, the region's label changes as soon as I do the selection. The expression used for commune doesn't matter.
If commune layer is not labeled, the region's label doesn't change unless I pan/zoom/refresh somehow the canvas.
If another layer in the project is labeled, the region's label doesn't change either unless I pan/zoom/refresh somehow the canvas
What is the bug or the crash?
I'm trying to update the label of a layer depending on selected features on another layer, based on their spatial relationship. The map canvas refreshes automatically only if both layers are labeled.
Steps to reproduce the issue
Let's take two layers, "commune" and "region", that have features overlapping. And I want to label "region" depending on whether an overlapped "commune" is selected. I'm using:
When I select a feature in "commune":
Versions
Tested on Windows 10 with QGIS 3.41 98c5bf8
Supported QGIS version
New profile
Additional context
No response
The text was updated successfully, but these errors were encountered: