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

show field alias when presenting constraint msg #3975

Merged
merged 1 commit into from Jan 11, 2017

Conversation

tudorbarascu
Copy link
Member

Before, when a field didn't passed the defined constraints
it showed a message in the form of "field name: Constraint defined message".

Now, if if a field alias is defined, the message is in the form of
"field alias: Constraint defined message"

I see it was already described at https://hub.qgis.org/issues/15455

@m-kuhn
Copy link
Member

m-kuhn commented Jan 11, 2017

Nice change!

Better use QgsVectorLayer::attributeDisplayName() instead of checking for an empty string - or for extra-karma-points add a displayName() method to QgsField.

@nyalldawson
Copy link
Collaborator

@m-kuhn
Copy link
Member

m-kuhn commented Jan 11, 2017

🥇

Before, when a field didn't passed the defined constraints
it showed a message in the form of "field name: Constraint defined message".

Now, if if a field alias is defined, the message is in the form of
"field alias: Constraint defined message"

See qgis#15455
@tudorbarascu
Copy link
Member Author

Thanks for the guidance guys!
I actually noticed this in 2.18 so I'll make a pull req with the backport.

@m-kuhn m-kuhn merged commit dbefbfe into qgis:master Jan 11, 2017
@m-kuhn
Copy link
Member

m-kuhn commented Jan 11, 2017

Thanks for the good work!

@tudorbarascu tudorbarascu deleted the field-alias branch January 12, 2017 05:38
nyalldawson added a commit to nyalldawson/QGIS that referenced this pull request Dec 10, 2018
The new QgsRenderContext::TextRenderFormat enum controls how text
should be handled during a render operation, e.g. whether to render
text as outlines (paths) or keep it as real text objects.

Deprecate previous arguments in QgsTextRenderer which handled
this same use case.

This allows us to make the setting vary per-render, instead of
having a single global flag controlling the setting. Ultimately
this will allow us to have different behaviour within the
canvas renders vs print layout exports.

Refs qgis#3975
nyalldawson added a commit to nyalldawson/QGIS that referenced this pull request Dec 10, 2018
nyalldawson added a commit that referenced this pull request Dec 11, 2018
The new QgsRenderContext::TextRenderFormat enum controls how text
should be handled during a render operation, e.g. whether to render
text as outlines (paths) or keep it as real text objects.

Deprecate previous arguments in QgsTextRenderer which handled
this same use case.

This allows us to make the setting vary per-render, instead of
having a single global flag controlling the setting. Ultimately
this will allow us to have different behaviour within the
canvas renders vs print layout exports.

Refs #3975
nyalldawson added a commit to nyalldawson/QGIS that referenced this pull request Dec 11, 2018
The new QgsRenderContext::TextRenderFormat enum controls how text
should be handled during a render operation, e.g. whether to render
text as outlines (paths) or keep it as real text objects.

Deprecate previous arguments in QgsTextRenderer which handled
this same use case.

This allows us to make the setting vary per-render, instead of
having a single global flag controlling the setting. Ultimately
this will allow us to have different behaviour within the
canvas renders vs print layout exports.

Refs qgis#3975

(cherry picked from commit 53345c3)
nyalldawson added a commit to nyalldawson/QGIS that referenced this pull request Dec 11, 2018
nyalldawson added a commit that referenced this pull request Dec 11, 2018
The new QgsRenderContext::TextRenderFormat enum controls how text
should be handled during a render operation, e.g. whether to render
text as outlines (paths) or keep it as real text objects.

Deprecate previous arguments in QgsTextRenderer which handled
this same use case.

This allows us to make the setting vary per-render, instead of
having a single global flag controlling the setting. Ultimately
this will allow us to have different behaviour within the
canvas renders vs print layout exports.

Refs #3975

(cherry picked from commit 53345c3)
nyalldawson added a commit that referenced this pull request Dec 11, 2018
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.

None yet

3 participants