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 a45913b2544148a6bdbcd257b9b01a245211928d
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/providers/ogr/qgsogrprovider.cpp
@@ -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.
You can’t perform that action at this time.