Skip to content
Permalink
Browse files

[ogr provider] insure connection pool updated when subset sql added/c…

…hanged (#5172)
  • Loading branch information
nirvn committed Sep 12, 2017
1 parent 06c5d24 commit 9b8fad515fbcfdc0dc08ed0c0728983b70eddd7d
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/providers/ogr/qgsogrprovider.cpp
@@ -543,7 +543,12 @@ bool QgsOgrProvider::setSubsetString( const QString &theSQL, bool updateFeatureC
uri += QStringLiteral( "|geometrytype=%1" ).arg( ogrWkbGeometryTypeName( mOgrGeometryTypeFilter ) );
}

setDataSourceUri( uri );
if ( uri != dataSourceUri() )
{
QgsOgrConnPool::instance()->unref( dataSourceUri() );
setDataSourceUri( uri );
QgsOgrConnPool::instance()->ref( dataSourceUri() );
}

OGR_L_ResetReading( ogrLayer );

0 comments on commit 9b8fad5

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