Just a side question, can't we make a default constructor like the one in qgis 2 and take the project instance context automatically in the constructor itself? Most of plugin writers won't know exactly what is the third parameter. And it's better to always use the project context if I understand.
2017-12-22 11:50 GMT+01:00 Denis Rouzaud <[email protected]>: > > > Le ven. 22 déc. 2017 à 04:39, Richard Duivenvoorde <[email protected]> > a écrit : > >> On 22-12-17 09:24, Richard Duivenvoorde wrote: >> >> >> crsTransform = QgsCoordinateTransform(crs2, crs) >> >> Just for reference, I think (but please correct me if otherwise) that >> for plugins this is then the easiest one? >> >> crsTransform = QgsCoordinateTransform(crs2, crs, QgsProject.instance()) >> > > Yes, please do so. > If you call with an empty context, this will not use project settings into > account. > > > > >> as even with a non saved project this will provide the necessary >> QgsCoordinateTransformContext ? >> >> R >> >> _______________________________________________ >> 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 > > > _______________________________________________ > 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 >
_______________________________________________ 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
