<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hi</div><div class=""><br class=""></div><div class="">I'm trying to set custom layers variables from processing using QgsExpressionContextUtils.setLayerVariables to destination layers , I have found that those variables does not appear in </div><div class="">Qgis. </div><div class=""><br class=""></div><div class="">I have found that when the layer is inserted in the current project (<a href="https://github.com/qgis/QGIS/blob/master/python/plugins/processing/gui/Postprocessing.py#L81" class="">https://github.com/qgis/QGIS/blob/master/python/plugins/processing/gui/Postprocessing.py#L81</a>) the layer variables are removed - Checking existence of the variable before</div><div class="">and after the call of 'addMaperLayer' shows that layer variables are removed from custom properties.</div><div class=""><br class=""></div><div class="">I cannot tell if this is a bug or not because it seems that the removal may occurs in some signal handler. So if somebody has some clues to where to look, I will be grateful.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div style="margin: 0px;" class=""><!--StartFragment-->Qgis version: 3.0.3-Girona<!--EndFragment--></div></div><div class=""><br class=""></div><div class="">David</div></body></html>