Bug report #13888

Label display not fit with layer order

Added by Nicolas Rochard over 1 year ago. Updated over 1 year ago.

Status:Closed Start Date:11/27/2015
Priority:Normal Due date:
Assigned to:- % Done:


Target version:-
Platform:Windows + Linux Pull Request or Patch supplied:No
Platform version:7 Pro 64 bits + openSUSE Leap 42.1 Affected version:2.12.0
Status info: Causes crash or corruption:No
Resolution: Tag:



Even with force layer order, label doesn't respect order.
Bug is not permanent, it seems depending of number of label to display on the canvas.
On screenshot, bigger label should be above small text as layer order indicated (epci is big label, commune is small one)

Note that if I export composer to SVG file, label order rendering is fine.


Capture_du_2015-11-27_10-17-14.png - label order problem (150.4 kB) Nicolas Rochard, 11/27/2015 01:26 am

Associated revisions

Revision 5e4c14cd402009037d8d82e8a6d75d495c24d55a
Added by Nyall Dawson over 1 year ago

[FEATURE] Control over label rendering order

A new control for setting a label's "z-index" has been added to
the labeling properties dialog. This control (which also accepts
data-defined overrides for individual features) determines the order
in which label are rendered. Label layers with a higher z-index
are rendered on top of labels from a layer with lower z-index.

Additionally, the logic has been tweaks so that if 2 labels have
matching z-indexes, then:
- if they are from the same layer, a smaller label will be drawn
above a larger label
- if they are from different layers, the labels will be drawn in
the same order as the layers themselves (ie respecting the order
set in the legend)

Diagrams can also have their z-index set (but not data defined)
so that the order of labels and diagrams can be controlled.

Note that this does NOT allow labels to be drawn below the
features from other layers, it just controls the order in which
labels are drawn on top of all the layer's features.

Fix #13888, #13559


Updated by Nyall Dawson over 1 year ago

  • Status changed from Open to Closed

Also available in: Atom