Skip to content
Permalink
Browse files

Ensure save as style file appends qml extension

... or you'll save in the DB instead
  • Loading branch information
elpaso committed Oct 25, 2018
1 parent 0959e9f commit 08f2a02adf6b560b6bd065e4cd95930d45596d83
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/app/qgisapp.cpp
@@ -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 );

0 comments on commit 08f2a02

Please sign in to comment.
You can’t perform that action at this time.