Skip to content

Commit

Permalink
Ensure save as style file appends qml extension
Browse files Browse the repository at this point in the history
... or you'll save in the DB instead
  • Loading branch information
elpaso committed Oct 25, 2018
1 parent 0959e9f commit 08f2a02
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -7398,6 +7398,11 @@ void QgisApp::saveStyleFile( QgsMapLayer *layer )
if ( filename.isEmpty() )
return;

if ( ! filename.endsWith( QStringLiteral( ".qml" ) ) )
{
filename += QStringLiteral( ".qml" );
}

bool defaultLoadedFlag;
layer->saveNamedStyle( filename, defaultLoadedFlag );

Expand Down

0 comments on commit 08f2a02

Please sign in to comment.