https://issues.qgis.org/https://issues.qgis.org/favicon.ico2017-09-12T04:12:56ZQGIS Issue TrackingQGIS Application - Bug report #16996: regression: symbol levels broken (each category/rule repeated twice, settings not saved)https://issues.qgis.org/issues/16996?journal_id=821012017-09-12T04:12:56ZMathieu Pellerin - nIRVnirvn.asia@gmail.com
<ul></ul><p>OK, I figured out the problem here.</p>
<p>When the symbol levels dialog was implemented, it worked with pointers to symbol layers, which it used to set the rendering pass level (see <a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/45caf4f6bc5acde5ac559b491ebfcea89ef58470" title="Allow changing rendering order in rule-based renderer">45caf4f6bc5acde5ac559b491ebfcea89ef58470</a>).</p>
<p>At some point in time (which I can't exactly find due to the symbology-ng -> symbology directory renaming), the code was updated to pass on a QgsLegendSymbolList, iterating through QgsLegendSymbolItem to retrieve symbol pointers. That's problematic as QgsLegendSymbolItem's symbol pointer is cloned (see <a class="external" href="https://github.com/qgis/QGIS/blob/master/src/core/symbology/qgslegendsymbolitem.cpp#L30">https://github.com/qgis/QGIS/blob/master/src/core/symbology/qgslegendsymbolitem.cpp#L30</a>), therefore the symbol level dialog ends up setting the rendering pass level to a cloned symbol.</p>
<p>Martin, the ball is in your court ;)</p> QGIS Application - Bug report #16996: regression: symbol levels broken (each category/rule repeated twice, settings not saved)https://issues.qgis.org/issues/16996?journal_id=821412017-09-13T05:37:29ZMathieu Pellerin - nIRVnirvn.asia@gmail.com
<ul><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul><p>Applied in changeset <a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/5e7dadd575cac089344db9e7abe78275a98227da" title="[symbology] resurrect symbol levels dialog (fixes #16996)">qgis|5e7dadd575cac089344db9e7abe78275a98227da</a>.</p>