Skip to content
Permalink
Browse files

Fix #12881 - Fix loading of QLR files with the same layers

Using just date stamps wasn't fine enough

Funded By TechnologyOne, Australia
  • Loading branch information
NathanW2 committed Jun 19, 2015
1 parent eaf17e5 commit a316290ada9e3141358dfac4cc03c6567ea057b9
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/qgslayerdefinition.cpp
@@ -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" );

0 comments on commit a316290

Please sign in to comment.
You can’t perform that action at this time.