Hi Nyall,

thanks for the answer.

> In 3.2 it should be possible, using a subclass of
> QgsProcessingLayerPostProcessorInterface and
> 
>     context.layerToLoadOnCompletionDetails( output_dest_id
> ).setPostProcessor( my_layer_post_processor() )
> 
> Your QgsProcessingLayerPostProcessorInterface subclass would set the
> style for the layer in its postProcessLayer implementation.
> 
> This is the canonical, thread safe way to do this in processing... any
> other approach (and there's other hacky ways to do this) will not be
> thread safe and may crash! We probably should make this a bit easier
> and have a direct `context.layerToLoadOnCompletionDetails(
> output_dest_id ).setLayerStyle(..... )` call, but it's too late for
> 3.2....

eheh, sorry too late to test all Processing options (too many of them ;) ).

what you suggested to implement in the future sounds as the smoothest idea.

Thanks again for the hints!

Matteo
_______________________________________________
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

Reply via email to