Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field with formula in layout does not update #37

Closed
mickmm opened this issue Aug 3, 2020 · 1 comment
Closed

Field with formula in layout does not update #37

mickmm opened this issue Aug 3, 2020 · 1 comment
Labels

Comments

@mickmm
Copy link

mickmm commented Aug 3, 2020

I have layouts containing HTML elements with formula like this: [%@layout_name%]

The formulas does not update/show on the exported pdf .

I solved the problem adding a line to refresh the layout before printing: exporter.layout().refresh()
…..

    # Do the export process
    exporter = QgsLayoutExporter(cView)
    
    #refresh the layout before printing
    exporter.layout().refresh()

    # Allow export cancelation
    QCoreApplication.processEvents()
    self.dlg.buttonBox.rejected.connect(self.stopProcessing)

….

I tested a normal layout and it worked. I did not test it with atlas.

Could you update update the code?

I would appreciate if you mention my name with this small (but important) contribution.

Regards

@mickmm mickmm added the bug label Aug 3, 2020
@DelazJ
Copy link
Owner

DelazJ commented Feb 10, 2021

Thanks. Fixed in 2fdeccf

@DelazJ DelazJ closed this as completed Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants