<div dir="ltr"><div><div><div>Hi,<br></div><div>No idea?<br></div>Looking the composer manager code[0], it seems that any action, such as deleting, duplicating or renaming a print composer, is processed through interating over all print composers. No direct access. Am I right?<br></div>Is there no other way? An equivalent of mapLayersByName ?<br></div>If not, since print composers have now unique name, this will be a good improvement, IMO.<br><div><div><br>[0] <a href="https://github.com/qgis/QGIS/blob/master/src/app/composer/qgscomposermanager.cpp">https://github.com/qgis/QGIS/blob/master/src/app/composer/qgscomposermanager.cpp</a><br></div><div><br>Thanks,<br>DelazJ<br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-07-05 13:23 GMT+02:00 DelazJ <span dir="ltr"><<a href="mailto:delazj@gmail.com" target="_blank">delazj@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div>Hi,<br></div>I have many print composers in a project and would like to select one of them, knowing its name. The only way I found yet is  to iterate over all composer views :<br></div></div>for cView in iface.activeComposers():<br></div>  if cView.composerWindow().windowTitle() == 'myTitle':<br></div>     # do what I want<br><br>Is this the only way to do it? Isn't there a more direct way to access print composer?<br><br></div>Thanks,<br></div>DelazJ<br></div>
</blockquote></div><br></div>