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

Updating composer label text via python - problem with Item Properties panel #15326

Closed
qgib opened this issue Jun 25, 2012 · 3 comments
Closed
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!

Comments

@qgib
Copy link
Contributor

qgib commented Jun 25, 2012

Author Name: James Stott (@jamesstott)
Original Redmine Issue: 5862
Affected QGIS version: master


I am writing a plugin that replaces the text of a composer label based on its itemID. The text in the label says "Original text" in this example.

When I change the text of the label using:

item.setText("Hello World")

the label changes on the composer but the text in the Item Properties panel for the label doesn't, it stays as "Original text".

If I call item.displayText() before and after I change the label text this returns "Hello World".

How do I get the text to change in the Item Properties panel? Using qgis 1.8 and 1.9

If I save the project and reopen it, it displays the changed text "Hello World".

I have attached a screenshot to demonstrate.


@qgib
Copy link
Contributor Author

qgib commented Jun 25, 2012

Author Name: Marco Hugentobler (@mhugent)


Update should work with 4e36df0. Please test and report back


  • status_id was changed from Open to Closed

@qgib
Copy link
Contributor Author

qgib commented Jun 26, 2012

Author Name: James Stott (@jamesstott)


thanks for looking at this. I will test once osgeo4w updates to a new version and let you know.

@qgib
Copy link
Contributor Author

qgib commented Jun 28, 2012

Author Name: James Stott (@jamesstott)


It works with this mornings update.

Thanks for fixing this.

Any chance this can make its way into the next release (1.8.1?) so I can utilise it on a stable version of QGIS rather than having to wait for 1.9/2.0 to come out?

@qgib qgib added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
Development

No branches or pull requests

1 participant