Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Append .qlr to file name if missing
  • Loading branch information
NathanW2 committed Jun 25, 2014
1 parent c686c4f commit 97e7f0a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -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 ) )
Expand Down

0 comments on commit 97e7f0a

Please sign in to comment.