Hi all,
I am trying to open the layout designer with the first Layout of the project
and Zoom to full, but it only works after I click the second time. I think the
problem is that I am not waiting for layout map render to finish (Please see
the code below)
Does anyone can help me?
Best regards,
Jorge Almerio
project = QgsProject.instance() manager = project.layoutManager()
layouts_list = manager.printLayouts()
if layouts_list: l_out = layouts_list[0]
self.iface.openLayoutDesigner(layout=l_out)
designer = iface.openLayoutDesigners()[0]
designer.window().showMaximized()
designer.view().zoomFull()else:
self.iface.messageBar().pushMessage("Uteis: ", self.tr('There is No
Layout defined!'), level=Qgis.Warning, duration=5)
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer