Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
QgsVectorLayer::loadNamedStyle(): make it work with non database URI
Such as OGR GPKG
  • Loading branch information
rouault committed Oct 25, 2016
1 parent e237963 commit a70d428
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgsvectorlayer.cpp
Expand Up @@ -4112,7 +4112,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 a70d428

Please sign in to comment.