Skip to content
Permalink
Browse files
Append .qlr to file name if missing
  • Loading branch information
NathanW2 committed Jun 25, 2014
1 parent c686c4f commit 97e7f0a08af4c4edd52e171f61b02695c9de3a32
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/app/qgisapp.cpp
@@ -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 ) )

0 comments on commit 97e7f0a

Please sign in to comment.