[Qgis-developer] LoadFromTemplate method broken?

Vincent Damoy vincent.damoy at espaces-naturels.fr
Wed Dec 3 07:14:52 PST 2014

Hello all,

Since QGIS 2.6, the LoadFromTemplate method seems not work any more (or 
works differently?)

This is my code to add items in my composer from a template :

|self.composition=  self.composerView.composition()
doc.setContent(file1,  False)
self.composition.loadFromTemplate(doc,  substitutionMap=None,  addUndoCommands=False)|

Up to 2.4 version, this code worked great. But since the last QGIS 
update, nothing is imported from the template. I do not get either error 

I've readen in QGIS changelogs, that the "Load from template" button is 
replaced by a "softer" "Add items from template" one. But it's in the 
GUI... In the API doc, the LoadFromTemplate method is still present. And 
should still work?
Has anybody else encountered this problem?



Vincent Damoy - Responsable SIG
Conservatoire d'espaces naturels du Nord et du Pas-de-Calais
152 bd de Paris - 62190 Lillers
Tél : - Fax :
/*Pour adhérer au Conservatoire :* 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20141203/85ab341d/attachment.html>

More information about the Qgis-developer mailing list