Skip to content

Commit 97e7f0a

Browse files
committed
Append .qlr to file name if missing
1 parent c686c4f commit 97e7f0a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/app/qgisapp.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -4820,6 +4820,9 @@ void QgisApp::saveAsLayerDefinition()
48204820
if ( path.isEmpty() )
48214821
return;
48224822

4823+
if ( !path.endsWith(".qlr" ) )
4824+
path = path.append(".qlr" );
4825+
48234826
QDomDocument doc = QgsMapLayer::asLayerDefinition( layers );
48244827
QFile file( path );
48254828
if ( file.open( QFile::WriteOnly | QFile::Truncate ) )

0 commit comments

Comments
 (0)