postProcessLayer()
of QgsProcessingLayerPostProcessorInterface
producing inconsistent results
#48087
Closed
2 tasks done
Labels
Bug
Either a bug report, or a bug fix. Let's hope for the latter!
Processing
Relating to QGIS Processing framework or individual Processing algorithms
What is the bug or the crash?
In a processing script, the recommended practice to rename the layer and apply style is through
postProcessLayer()
ofQgsProcessingLayerPostProcessorInterface
.I want to apply styles to all layers in my processing script and rename them. I am using the above-recommended method to achieve this.
I have written a script that works most of the time but not all the time. I ran the script multiple times to ensure that nothing in the code was changing yet the QGIS applied style sometimes and sometimes not.
Here is my function that applies styles, full code in the attachment below.
Please see this demo:
2022-04-04.18-03-42_Trim.online-video-cutter.com.1.mp4
Steps to reproduce the issue
style_issue.zip
Versions
3.22.4
Supported QGIS version
New profile
Additional context
https://gis.stackexchange.com/questions/423650/qgsprocessinglayerpostprocessorinterface-only-processing-the-last-layer
The text was updated successfully, but these errors were encountered: