Skip to content

Commit a70d428

Browse files
committed
QgsVectorLayer::loadNamedStyle(): make it work with non database URI
Such as OGR GPKG
1 parent e237963 commit a70d428

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/qgsvectorlayer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4112,7 +4112,7 @@ QString QgsVectorLayer::loadNamedStyle( const QString &theURI, bool &theResultFl
41124112
QString QgsVectorLayer::loadNamedStyle( const QString &theURI, bool &theResultFlag, bool loadFromLocalDB )
41134113
{
41144114
QgsDataSourceUri dsUri( theURI );
4115-
if ( !loadFromLocalDB && !dsUri.database().isEmpty() )
4115+
if ( !loadFromLocalDB && mDataProvider && mDataProvider->isSaveAndLoadStyleToDBSupported() )
41164116
{
41174117
QgsProviderRegistry * pReg = QgsProviderRegistry::instance();
41184118
QLibrary *myLib = pReg->providerLibrary( mProviderKey );

0 commit comments

Comments
 (0)