<div dir="ltr">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?<div>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.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-12-22 11:50 GMT+01:00 Denis Rouzaud <span dir="ltr"><<a href="mailto:denis.rouzaud@gmail.com" target="_blank">denis.rouzaud@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"><br><br><div class="gmail_quote"><span class=""><div dir="ltr">Le ven. 22 déc. 2017 à 04:39, Richard Duivenvoorde <<a href="mailto:rdmailings@duif.net" target="_blank">rdmailings@duif.net</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 22-12-17 09:24, Richard Duivenvoorde wrote:<br>
<br>
>> crsTransform = QgsCoordinateTransform(crs2, crs)<br>
<br>
Just for reference, I think (but please correct me if otherwise) that<br>
for plugins this is then the easiest one?<br>
<br>
crsTransform = QgsCoordinateTransform(crs2, crs, QgsProject.instance())<br></blockquote><div><br></div></span><div>Yes, please do so.</div><div>If you call with an empty context, this will not use project settings into account.</div><span class=""><div><br></div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
as even with a non saved project this will provide the necessary<br>
QgsCoordinateTransformContext ?<br>
<br>
R<br>
<br>
______________________________<wbr>_________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a></blockquote></span></div></div>
<br>______________________________<wbr>_________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br></blockquote></div><br></div>