mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Append .qlr to file name if missing
This commit is contained in:
parent
c686c4fed8
commit
97e7f0a08a
@ -4820,6 +4820,9 @@ void QgisApp::saveAsLayerDefinition()
|
||||
if ( path.isEmpty() )
|
||||
return;
|
||||
|
||||
if ( !path.endsWith(".qlr" ) )
|
||||
path = path.append(".qlr" );
|
||||
|
||||
QDomDocument doc = QgsMapLayer::asLayerDefinition( layers );
|
||||
QFile file( path );
|
||||
if ( file.open( QFile::WriteOnly | QFile::Truncate ) )
|
||||
|
Loading…
x
Reference in New Issue
Block a user