Emit idChanged on readLayerXml if id is changed

This commit is contained in:
Nyall Dawson 2024-04-20 10:18:54 +10:00
parent d750c9d89c
commit 031b2c755d

View File

@ -598,7 +598,12 @@ bool QgsMapLayer::readLayerXml( const QDomElement &layerElement, QgsReadWriteCon
mne = mnl.toElement();
if ( ! mne.isNull() && mne.text().length() > 10 ) // should be at least 17 (yyyyMMddhhmmsszzz)
{
mID = mne.text();
const QString newId = mne.text();
if ( newId != mID )
{
mID = mne.text();
emit idChanged( mID );
}
}
}