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

converted size expr evaluate to 0 on NULL field #2113

Closed
wants to merge 1 commit into from

Conversation

vmora
Copy link
Contributor

@vmora vmora commented Jun 5, 2015

fix #12888
use coalesce(expr,0) to have zero size if expression evaluates to NULL
otherwise the default size would be used

fix qgis#12888
use coalesce(expr,0) to have zero size if expression evaluates to NULL
otherwise the default size would be used
@vmora
Copy link
Contributor Author

vmora commented Jun 9, 2015

@nyalldawson As I mentioned in the ML "[Qgis-developer] Bug in symbol size data-defined override"

The default size when the expression evaluate to NULL will also be an issue with the size assistant. Maybe we should use coalesce( expr, 0 ) in QgsScaleExpression.

@nyalldawson
Copy link
Collaborator

@vmora sorry, forgot to merge this. But I'm interested in other opinions regarding the null behaviour. I think for everything non-size related then we definitely should fallback from null to the user set value, but I'm not 100% sure about sizes. What's the use case for having data defined size with null values as hidden symbols anyway?

@vmora
Copy link
Contributor Author

vmora commented Jun 9, 2015

@nyalldawson I made a PR to have the assistant generate size expr with the coalesce #2128

IMO, when your symbol size is DD, then the size carries information, if you don't have the information, you don't want it to have a misleading default value. This was the old behavior and I believe it should be maintained.

Let's see the answer on the ML before merging #2128

@haubourg
Copy link
Member

haubourg commented Jun 9, 2015

@nyalldawson Hi Nyall, from a user point of view, this is really strange to have a NULL fall back to a value not set inside the expression. I expect, and QGIS 2.6 (or 2.4, can't remember) did that, to always see points, and NULL values should only show minimum possible size.
This avoids masking some objects, and avoids caveats in some use cases such as selection by hand, not showing all.
Cheers,
Régis

@nyalldawson
Copy link
Collaborator

@vmora should i merge this? what was the final decision?

@vmora
Copy link
Contributor Author

vmora commented Jun 23, 2015

@nyalldawson yes, this one maintains the old behaviour, so I think this should be merged.

@haubourg #2128 now gives control to the user for the size when expression is NULL.

@nyalldawson
Copy link
Collaborator

merged in 4fb22b4, thanks!

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.

3 participants