<div dir="ltr">Maybe a better discussion to be having is "can we make it possible to manually edit layer ids", but i think that will probably be dependant on the existing QEPs like <a href="https://github.com/qgis/QGIS-Enhancement-Proposals/issues/76">https://github.com/qgis/QGIS-Enhancement-Proposals/issues/76</a><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 19 Aug 2021 at 21:29, Jésahel Benoist <<a href="mailto:djes1975@gmail.com">djes1975@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">Le jeu. 19 août 2021 à 20:23, Charles Dixon-Paver <<a href="mailto:charles@kartoza.com" target="_blank">charles@kartoza.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I would imagine there are just far too many projects and use cases where the same layer name is used for multiple layers. </div></blockquote></div><div dir="auto"><br></div><div dir="auto">Yes, certainly. But the random id is a bad solution. I think the id should be created sequentially and could be modified by the user. </div><div dir="auto"><br></div><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Saving and loading themes etc is a feature request I imagine. </div></blockquote></div><div dir="auto"><br></div><div dir="auto">Yes :)</div><div dir="auto"><br></div><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Copying styles between layers is supported (and you can save style and layer definitions). </div></blockquote></div><div dir="auto"><br></div><div dir="auto">Yes, a good tip is to assignate keys to copy/paste style.</div><div dir="auto"><br></div><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I imagine most issues can be resolved by just using an expression based id wherever possible, with something like this:<div><br></div><div><span style="font-family:monospace">QgsProject.instance().mapLayersByName('World Map')[0].id()</span></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"></blockquote></div></blockquote></div><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"></blockquote></div></blockquote></div><div dir="auto"><br></div><div dir="auto">Sure</div><div dir="auto"><br></div><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"></blockquote></div></blockquote></div><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
</blockquote></div>
</blockquote></div></div>
</blockquote></div>