Skip to content

Commit

Permalink
Fix #12881 - Fix loading of QLR files with the same layers
Browse files Browse the repository at this point in the history
Using just date stamps wasn't fine enough

Funded By TechnologyOne, Australia
  • Loading branch information
NathanW2 committed Jun 19, 2015
1 parent eaf17e5 commit a316290
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgslayerdefinition.cpp
Expand Up @@ -49,7 +49,7 @@ bool QgsLayerDefinition::loadLayerDefinition( QDomDocument doc, QgsLayerTreeGrou
// Strip the date part because we will replace it.
QString layername = oldid.left( oldid.length() - 17 );
QDateTime dt = QDateTime::currentDateTime();
QString newid = layername + dt.toString( "yyyyMMddhhmmsszzz" );
QString newid = layername + dt.toString( "yyyyMMddhhmmsszzz" ) + QString::number( qrand() );
idElem.firstChild().setNodeValue( newid );
QDomNodeList treeLayerNodes = doc.elementsByTagName( "layer-tree-layer" );

Expand Down

0 comments on commit a316290

Please sign in to comment.