I'm working on a plugin to put items (pictures, arrows, labels) on the Print Composer layout. Everything is fine with the exception that once they are drawn, none of these show up in the "items" panel until saving and reopening the project, or duplicating the composer (only in the duplicate). It is not a terrible problem but it is not ideal either. Does anyone know why and how to solve this?

  • Maybe there is some sort of a refresh method you need to call (composition.refreshItems())? – artwork21 Dec 4 '15 at 11:59
  • I tried that but didn't work. – andy Dec 4 '15 at 12:30

Fiddling around I found out that after adding all the items, using the QgsComposition.refreshZList() function will do the trick. However, it is not possible to edit them from the "items" panel until saving and re-opening the project.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.