I am using some code I found online to add rule-based symbology to my layer.

https://gis.stackexchange.com/questions/250869/managing-rule-based-renderer-in-pyqgis

I want to put layers of the same category in one vector layer rather than 
making them separate layers and congesting my layer panel.  So as I add the 
layer to the map canvase, I perform a merge to merge it into the category layer 
adding data of the same type to its category layer.  This is polygon data and 
each polygon also has one or more buffers associated with it.

When I use the code I found at the ling above my layers are not shown in the 
order they are added.  They are properly ordered in the attribute table of the 
category layer, so wondering why the rules do not get applied based on that 
order.

Wondering if there is a sort method or how I can get it to create the rules in 
an order I prefer.  I can go to the properties of the layer and reorder the 
rules that get created by the code but want to do this in code.

Luke Catania
US Army ERDC-GRL
JCMS Site Planning Developer

_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to