<div dir="ltr">Although it adds a new setting, my vote goes to solution 2. I'm not a fan of "black magic".<div><br></div><div>Cheers,</div><div>Denis</div></div><br><div class="gmail_quote"><div dir="ltr">Le sam. 5 août 2017 à 08:50, Nyall Dawson <<a href="mailto:nyall.dawson@gmail.com">nyall.dawson@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
I've recently been made aware of an issue regarding creating new print<br>
compositions from templates.<br>
<br>
Currently, the logic used here is:<br>
<br>
1. For all map items in the template, check the stored map extent<br>
2. If this stored extent intersects the full extent of the layers in<br>
the map canvas, then keep it. If not, reset the map item's extent to<br>
match the map canvas.<br>
<br>
I think this logic could be refined. The issue is that any project<br>
with a "global" basemap layer (such as a wms/xyz<br>
tiled/QuickMapServices/etc layer) will ALWAYS satisy the "stored<br>
extent intersects the full canvas extent" requirement, so the map<br>
item's extent will never be altered.<br>
<br>
Possible solutions I can see are:<br>
1. Change the test to be "if the stored extent has any intersection<br>
with the CURRENT map canvas extent, keep it. Otherwise reset it to the<br>
map canvas extent."<br>
2. (more intrusive, but more flexible) Add a new "template settings"<br>
section to composer map item properties, with a checkbox for "Store<br>
map extent for use in templates". If checked, the stored map extent in<br>
the template will ALWAYS be used for that map. If unchecked, the map's<br>
extent will ALWAYS be reset to match the current canvas extent. It's<br>
an extra setting, but possibly making the logic explicit and visible<br>
to users will actually make this behaviour simpler to understand.<br>
<br>
What are other's thoughts?<br>
<br>
Nyall<br>
_______________________________________________<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/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></blockquote></div>