Skip to content

Commit 77ed6ca

Browse files
committed
QgsVectorLayer::loadNamedStyle(): make it work with non database URI
Such as OGR GPKG
1 parent 5d7f8e9 commit 77ed6ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/qgsvectorlayer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4394,7 +4394,7 @@ QString QgsVectorLayer::loadNamedStyle( const QString &theURI, bool &theResultFl
43944394
QString QgsVectorLayer::loadNamedStyle( const QString &theURI, bool &theResultFlag, bool loadFromLocalDB )
43954395
{
43964396
QgsDataSourceURI dsUri( theURI );
4397-
if ( !loadFromLocalDB && !dsUri.database().isEmpty() )
4397+
if ( !loadFromLocalDB && mDataProvider && mDataProvider->isSaveAndLoadStyleToDBSupported() )
43984398
{
43994399
QgsProviderRegistry * pReg = QgsProviderRegistry::instance();
44004400
QLibrary *myLib = pReg->providerLibrary( mProviderKey );

0 commit comments

Comments
 (0)