Skip to content
Permalink
Browse files
[ogr provider] insure connection pool updated when subset sql added/c…
…hanged (#5174)
  • Loading branch information
nirvn committed Sep 12, 2017
1 parent 9c4d1da commit a45913b
Showing 1 changed file with 6 additions and 1 deletion.
@@ -555,7 +555,12 @@ bool QgsOgrProvider::setSubsetString( const QString& theSQL, bool updateFeatureC
uri += QString( "|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 a45913b

Please sign in to comment.