Bug report #21018

Layout variables list not updated when a new variable is added programmatically.

Added by Matteo Nastasi almost 6 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:Map Composer/Printing
Affected QGIS version:3.4.3 Regression?:No
Operating System:Linux Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:28837

Description

When programmatically setting a layout variable using

QgsExpressionContextUtils.setLayoutVariable(layout, 'var_name', 'var_value')

the layout variables list is not updated.

The expression editor correctly shows the new variable.

var_bug.png - The list of variables not updated. (54.9 KB) Matteo Nastasi, 2019-01-17 09:59 AM

Also available in: Atom PDF