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

Fix label mask sizes get reset to 0 #57555

Merged
merged 1 commit into from
May 26, 2024
Merged

Conversation

nyalldawson
Copy link
Collaborator

This paper cut rears its head in that when first enabling label masks for an existing project layer, the mask size will default to "0", which is confusing for users as it seems to have no effect.

The older maskSize attribute used to be treated as 0 instead of the default 1.5 mm size when no mask settings were available, and then when the project was saved this incorrect 0 value would become an actual valid attribute in the XML.

Since we can't now differentiate a valid 0 value from an accidental 0 value in older projects, we instead assume "0" as a mistake and reset it to 1.5. when the project is saved the newer maskSize2 attribute will be used and we know that a "0" value WAS an explicit user choice.

This paper cut rears its head in that when first enabling
label masks for an existing project layer, the mask size will
default to "0", which is confusing for users as it seems to
have no effect.

The older maskSize attribute used to be treated as 0 instead
of the default 1.5 mm size when no mask settings were available, and
then when the project was saved this incorrect 0 value would
become an actual valid attribute in the XML.

Since we can't now differentiate a valid 0 value from an accidental
0 value in older projects, we instead assume "0" as a mistake and
reset it to 1.5. when the project is saved the newer maskSize2
attribute will be used and we know that a "0" value WAS an explicit
user choice.
@github-actions github-actions bot added this to the 3.38.0 milestone May 24, 2024
Copy link

🪟 Windows builds ready!

Windows builds of this PR are available for testing here. Debug symbols for this build are available here.

(Built from commit 9cc2416)

@nyalldawson nyalldawson merged commit 740075b into qgis:master May 26, 2024
35 checks passed
@nyalldawson nyalldawson deleted the fix_mask_size branch May 26, 2024 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants