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

Don't overwrite existing data defined property expressions when an interactive map tool is used to move/rotate/edit labels #45279

Merged
merged 6 commits into from
Sep 28, 2021

Conversation

nyalldawson
Copy link
Collaborator

But instead automatically upgrade this property to use a

coalesce("aux field", 'existing' || 'property' || 'expression')

type expression, so that the tool will place the interactively edited position/rotation/etc in the auxiliary field but default to using the expression for all other features

Fixes #44475

QgsAuxiliaryLayer::createProperty(*)

Instead, if a property already exists it will be upgraded to
an expression based property of the form:

    coalesce("new aux field", 'existing' || 'property' || 'expression')

(i.e. allow per-feature value overrides from the auxiliary field,
but by default fallback to the existing property definition)

Refs qgis#44475
properties of the form coalesce("new aux field", 'some' || 'expression')

Refs qgis#44475
an interactive map tool is used to move/rotate/edit labels

But instead automatically upgrade this property to use a

    coalesce("aux field", 'existing' || 'property' || 'expression')

type expression, so that the tool will place the interactively
edited position/rotation/etc in the auxiliary field but default
to using the expression for all other features

Fixes qgis#44475
@github-actions github-actions bot added this to the 3.22.0 milestone Sep 28, 2021
Copy link
Contributor

@nirvn nirvn left a comment

Choose a reason for hiding this comment

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

Cool trick.

@nyalldawson nyalldawson merged commit 41f0918 into qgis:master Sep 28, 2021
@nyalldawson nyalldawson deleted the fix_44475 branch September 28, 2021 03:25
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.

Expressions for label rotation does no longer work
2 participants