<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head><!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]--></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_ym19_1_1517644411783_26351" dir="ltr"><span id="yui_3_16_0_ym19_1_1517644411783_26352">Hi, in this experimental QEP [1] QGIS saves all map views to project file. It saves the full window state of the application. But there is an issue with this [2], Qt does not provide a method similar to restoreDockWidget() [3] to restore as better as possible the state of a specific widget (a widget with a map) without change the full window state of the application. Therefore, the loading of a project with non-floating maps may cause that windows previously closed appear, or visible windows disappear.</span></div><div id="yui_3_16_0_ym19_1_1517644411783_26351" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1517644411783_26351" dir="ltr">I hope this helps to decide best solution.<br></div><div id="yui_3_16_0_ym19_1_1517644411783_26353"><br></div><div id="yui_3_16_0_ym19_1_1517644411783_26355">Regards</div><div id="yui_3_16_0_ym19_1_1517644411783_26355">Alvaro</div><div id="yui_3_16_0_ym19_1_1517644411783_26355"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1517644411783_26357">[1] <a href="https://github.com/qgis/QGIS/pull/3465" id="yui_3_16_0_ym19_1_1517644411783_26358">https://github.com/qgis/QGIS/pull/3465</a></div><div class="qtdSeparateBR" id="yui_3_16_0_ym19_1_1517644411783_26339" dir="ltr">[2] <a href="https://github.com/qgis/QGIS-Enhancement-Proposals/issues/70" id="yui_3_16_0_ym19_1_1517644411783_27464">https://github.com/qgis/QGIS-Enhancement-Proposals/issues/70</a></div><div class="qtdSeparateBR" id="yui_3_16_0_ym19_1_1517644411783_26339" dir="ltr">[3] <a href="http://doc.qt.io/archives/qt-4.8/qmainwindow.html#restoreDockWidget" id="yui_3_16_0_ym19_1_1517644411783_27465">http://doc.qt.io/archives/qt-5.8/qmainwindow.html#restoreDockWidget</a></div><div class="qtdSeparateBR" id="yui_3_16_0_ym19_1_1517644411783_26339" dir="ltr"><br></div><div class="qtdSeparateBR" id="yui_3_16_0_ym19_1_1517644411783_26339" dir="ltr"><br></div><div class="yahoo_quoted" id="yui_3_16_0_ym19_1_1517644411783_26961" style="display: block;"> <div style="font-family: Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_ym19_1_1517644411783_26960"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_ym19_1_1517644411783_26959"> <div dir="ltr" id="yui_3_16_0_ym19_1_1517644411783_26958"> <font size="2" face="Arial" id="yui_3_16_0_ym19_1_1517644411783_26965"> <hr size="1" id="yui_3_16_0_ym19_1_1517644411783_26964"> <b><span style="font-weight:bold;">De:</span></b> Richard Duivenvoorde <rdmailings@duif.net><br> <b><span style="font-weight: bold;">Para:</span></b> Paolo Cavallini <cavallini@faunalia.it>; qgis-developer@lists.osgeo.org <br> <b><span style="font-weight: bold;">Enviado:</span></b> Sábado 3 de febrero de 2018 10:23<br> <b><span style="font-weight: bold;">Asunto:</span></b> Re: [QGIS-Developer] Saving New Map View(s)<br> </font> </div> <div class="y_msg_container" id="yui_3_16_0_ym19_1_1517644411783_26962"><br><div dir="ltr" id="yui_3_16_0_ym19_1_1517644411783_26963">On 03-02-18 09:38, Paolo Cavallini wrote:<br clear="none">> Il 03/02/2018 00:44, Nyall Dawson ha scritto:<br clear="none">> <br clear="none">>> No, you're correct. Closing the view deletes it and removes it from<br clear="none">>> the project. What would you suggest happens here?<br clear="none">> <br clear="none">> IMHO this ends up in erasign user data without warning, which is a<br clear="none">> serious bug. A warning before closing could suffice.<br clear="none"><br clear="none">Yes, I agree: only warn the user 'if you close this view, it will not be<br clear="none">saved in your project' or something like that.<br clear="none"><br clear="none">The alternative: 'remembering closes/invisible views' in the project<br clear="none">file is doomed to give problems I think. It is like an old bug we had<br clear="none">earlier: removing layers from the layers list still had the providers in<br clear="none">the project file, so you saw your project firing requests to wms's which<br clear="none">you deleted earlier as file ...<br clear="none"><br clear="none">Regards,<br clear="none"><br clear="none">Richard Duivenvoorde<div class="yqt7770233912" id="yqtfd20501"><br clear="none"><br clear="none">_______________________________________________<br clear="none">QGIS-Developer mailing list<br clear="none"><a shape="rect" ymailto="mailto:QGIS-Developer@lists.osgeo.org" href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a><br clear="none">List info: <a shape="rect" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br clear="none">Unsubscribe: <a shape="rect" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></div></div><br><br></div> </div> </div> </div></div></body></html>