<div dir="ltr">Hi All, <div><br></div><div style="">what is the purpose of originalName() method in QgsMapLayer class?</div><div style=""><br></div><div style="">Documentation states:</div><div style="">   Get the original name of the layer.</div><div style="">   Returns</div><div style="">           the original layer name </div><div style=""><br></div><div style="">Which perhaps isn't clear enough.</div><div style=""><br></div><div style="">Plugin developers reading the API would generally expect originalName to preserve the name the layer was given when it was first loaded into QGIS. And it might be so, except for this line (<a href="http://qgis.org/api/2.14/qgsmaplayer_8cpp_source.html#l00117">http://qgis.org/api/2.14/qgsmaplayer_8cpp_source.html#l00117</a>) that modifies the originalName private variable.</div><div style=""><br></div><div style="">Am I getting it wrong? Is id() supposed to fulfill such requirement?</div><div style=""><br></div><div style="">Regards,</div><div style=""><br></div><div style="">Germán</div><div style=""><br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-12-08 6:33 GMT-05:00 René-Luc Dhont <span dir="ltr"><<a href="mailto:rldhont@gmail.com" target="_blank">rldhont@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
<br>
Le 22/09/2015 13:36, Paolo Cavallini a écrit :<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Il 22/09/2015 13:24, Tom Chadwin ha scritto:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Many apologies - you are right. I change "Layer name", and couldn't<br>
understand what Display as was meant to be: a non-editable text field which<br>
mirrors Layer name? Why?<br>
</blockquote>
agreed, an old issue, I also do not understant its use.<br>
all the best.<br>
</blockquote>
<br>
It's not an issue :-)<br>
<br>
In QgsMapLayer there are originalName and name.<br>
The method setLayerName sets originalName and name.<br>
The attribute name is the capitalize originalName if the settings "/qgis/capitaliseLayerName" is set to True.<br>
<br>
In the Layer properties the originalName and Name are displayed and the originalName is the editable attribute.<br>
<br>
René-Luc<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="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div>-----------<br></div><div>   |\__  <br>(:>__)(<br>   |/    <br>Soluciones Geoinformáticas Libres                            <br><a href="http://geotux.tuxfamily.org/" target="_blank">http://geotux.tuxfamily.org/</a><br><a href="http://twitter.com/GeoTux2" target="_blank">http://twitter.com/GeoTux2</a></div><div><a href="http://about.me/germancarrillo" target="_blank">http://about.me/germancarrillo</a><br></div><div><div><br></div><div><a href="http://gis.stackexchange.com/users/4972/germ%c3%a1n-carrillo" target="_blank"><img src="http://gis.stackexchange.com/users/flair/4972.png"></a></div></div></div></div></div></div></div>
</div></div>