Project: QGIS

Version: 3.12

Feature: When decimal degrees rotation fails to evaluate, fallback to static value

The legend finally also works nicely with data defined rotation. QGIS could already apply data defined rotation to symbols and individual symbol layers, but this resulted in a broken legend. The rotation of symbols (and symbol parts defined on symbol layers) on the legend can now be controlled by changing the default values next to the data defined properties.

The old behavior was to always fall back to 0 in case of a failing expression. Which made it hard to create a proper legend in some cases.

e.g. if you had two symbol layers with the following expressions for their rotation

"orientation"

And

90 + "orientation"

which would be two orthogonal symbol layers (e.g. denote a right angle), rotated by an orientation field.

Now in the legend (and symbol preview), both layers would be shown with a rotation of 0, because there is no associated feature with a field orientation.

The new behavior is to fall back to the static, configured values which makes it very intuitive to configure the legend for these cases.

Before

After

This feature was developed by Matthias Kuhn