Hi
I execute the following code:
selected_feature = layer.selectedFeatures()
layer.startEditing()
for feature in selected_feature:
feature["focus"] = 1
layer.updateFeature(feature)
layer.commitChanges()
The update of the values works fine, the opened attribute table shows the new
attribute values but the conditional formatting in the attribute table (full
row) is not applied to the updated features if only one feature is selected. If
selected_features contains several features, the conditional formatting works
except for the first selected feature, so it is not correct.
The refresh of conditional formatting works perfectly if the conditional
formatting is field based (rule un field focus). The full row conditional
formatting is only applied correctly if I close and reopen the attribute table.
Is this a bug in full row based conditional formatting or do I have to use
another method to update the attributes? Exist a workaround to force the
refresh of conditional formatting full row rules on a opened attribute table?
Thanks for your help in advance
Guido
____________________________________________________
Dipl. Ing. ETH Guido Häfliger
EDV/GIS-Spezialist
Tel. ++41 41 462 97 60
[email protected]<mailto:[email protected]>
www.vogelwarte.ch<http://www.vogelwarte.ch/>
Schweizerische Vogelwarte | Seerose 1 | CH-6204 Sempach | Schweiz
Station ornithologique suisse | Seerose 1 | CH-6204 Sempach | Suisse
Stazione ornitologica svizzera | Seerose 1 | CH-6204 Sempach | Svizzera
Swiss Ornithological Institute | Seerose 1 | CH-6204 Sempach | Switzerland
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer