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

Label masking doesn't work with line pattern symbol sub layers #34352

Closed
nirvn opened this issue Feb 7, 2020 · 6 comments · Fixed by #50786
Closed

Label masking doesn't work with line pattern symbol sub layers #34352

nirvn opened this issue Feb 7, 2020 · 6 comments · Fixed by #50786
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Labeling Related to QGIS map labeling

Comments

@nirvn
Copy link
Contributor

nirvn commented Feb 7, 2020

While testing out the label masking feature some more today, I stumble on an implementation issue, whereas line pattern symbol's sub layer aren't masked.

Test project here:
mask.zip

You can see here the hashed lines are checked to be masked but
Screenshot from 2020-02-07 17-35-47

@nirvn nirvn added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Feb 7, 2020
@nirvn
Copy link
Contributor Author

nirvn commented Feb 10, 2020

@mhugo , gentle ping. It'd be great if you could look into this issue before masking is officially released as part of 3.12. Cheers

@mhugo
Copy link

mhugo commented Feb 11, 2020

@nirvn Thanks for your feedback. However, I am struggling to find some available time to work on it before 3.12 ...

@nirvn
Copy link
Contributor Author

nirvn commented Feb 11, 2020

@mhugo , OK, it's a shame though, it means QGIS will ship masking without sub-symbol support (hashed lines, point pattern, geometry generator, etc.). Nobody can force you to find that hour before now and release date to insure the implementation is complete, but I'll keep hoping you find time until then.

@mhugo
Copy link

mhugo commented Feb 11, 2020

After some time spent on a debugging session, it seems to come from QgsLinePatternFillSymbolLayer::applyPattern
https://github.com/qgis/QGIS/blob/master/src/core/symbology/qgsfillsymbollayer.cpp#L2517
where the fill line sub symbol is cloned for some reasons.

The symbol layer pointers that have to be disabled in the second pass and are stored in the rendering context do not correspond anymore ...
So I have to find a more robust way to disable symbol layers during the second pass ...

Not easy :-(

@Pedro-Murteira
Copy link

Still valid on QGIS 3.22.3.

@thymaro
Copy link

thymaro commented Apr 25, 2022

I don't understand how, but I understand that it is complicated to fix. So, this is not a rant, just another sitrep:

I can confirm this is still valid for QGIS 3.22.6. Line pattern fills don't respect masks.
grafik

troopa81 added a commit to troopa81/QGIS that referenced this issue Oct 19, 2022
Don't use pointers anymore because there are not stable when it comes
to clone
@troopa81 troopa81 self-assigned this Oct 19, 2022
troopa81 added a commit to troopa81/QGIS that referenced this issue Nov 3, 2022
Don't use pointers anymore because there are not stable when it comes
to clone
troopa81 added a commit to troopa81/QGIS that referenced this issue Nov 9, 2022
Don't use pointers anymore because there are not stable when it comes
to clone
troopa81 added a commit to troopa81/QGIS that referenced this issue Feb 6, 2023
Don't use pointers anymore because there are not stable when it comes
to clone
troopa81 added a commit to troopa81/QGIS that referenced this issue Feb 13, 2023
Don't use pointers anymore because there are not stable when it comes
to clone
troopa81 added a commit to troopa81/QGIS that referenced this issue Feb 27, 2023
Don't use pointers anymore because there are not stable when it comes
to clone
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! Labeling Related to QGIS map labeling
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants