Skip to content

Commit

Permalink
QgsVectorLayer::loadNamedStyle(): make it work with non database URI
Browse files Browse the repository at this point in the history
Such as OGR GPKG
  • Loading branch information
rouault committed Oct 26, 2016
1 parent 5d7f8e9 commit 77ed6ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgsvectorlayer.cpp
Expand Up @@ -4394,7 +4394,7 @@ QString QgsVectorLayer::loadNamedStyle( const QString &theURI, bool &theResultFl
QString QgsVectorLayer::loadNamedStyle( const QString &theURI, bool &theResultFlag, bool loadFromLocalDB )
{
QgsDataSourceURI dsUri( theURI );
if ( !loadFromLocalDB && !dsUri.database().isEmpty() )
if ( !loadFromLocalDB && mDataProvider && mDataProvider->isSaveAndLoadStyleToDBSupported() )
{
QgsProviderRegistry * pReg = QgsProviderRegistry::instance();
QLibrary *myLib = pReg->providerLibrary( mProviderKey );
Expand Down

0 comments on commit 77ed6ca

Please sign in to comment.