[Qgis-developer] Bug in symbol size data-defined override

Vincent Mora vincent.mora at oslandia.com
Tue Jun 9 00:39:58 PDT 2015


On 08/06/2015 15:46, Andreas Neumann wrote:
> I agree - a rename to "size assistant" or "sizing assistant" would be
> useful. In my opinion, the new solution is not harder to find than the
> old solution - which was pretty hard to find and even more
> disconnected to the actual symbol than the new solution. I agree, it
> is still a bit hidden, but it belongs to the expression - that's why
> the current solution isn't bad.

I made a PR on QGIS-Documentation yesterday to show the assistant and
explain how to access it. Hope that helps.

The reason it's a bit hidden is that the DD-button is now everywhere in
the Style interface, so the user will get used to the concept, and
data-defined for the Size field seemed quite obvious to me.

The user can also use the 'Graduated by size' to have varying size
symbols, there it's more visible.

The idea behind the generic "assistant" name in the DD-menu is that
DD-button are related to a field in the gui (here Size, so
Size-assistant) and we may want other DD-assitants in the future
(setting-up a color expression, font expression, or a marker shape
expression would benefit from that).

That beeing said, we can add an icon beside the DD-button to launch the
assistant (e.g. magic wand with the appropriate tooltip, or circles with
increasing diameters).

>
> Andreas
>
> On 08.06.2015 15:26, Régis Haubourg wrote:
>> Alexandre Neto wrote
>>> Not sure if data-defined override for Symbol Size should even be
>>> connected
>>> to the size-scale method, since in this case it should simply
>>> override the
>>> symbol size value.
>> In master UI refactoring, area or diameter selector disappeared, and
>> we now
>> have an assistant for that.
>> Expressions directly typed refer to size (diameter) and are no more
>> influence by this modifier.
>>
The scale method will gently disappear from the code, the default is now
ScaleDiameter and cannot be changed. The expression for the size is not
composed anymore with a sqrt.

The only thing  that may be misleading is that features with size
expressions that evaluate to NULL will be drawn with the default size
(due to fixing symbols with DD-fields not being drawn in preview and
legend). If it's an unwanted behaviour, then using
coalesce(size_expression, 0) for the size expression will fix that
easily enough.

Vincent.




More information about the Qgis-developer mailing list