postgres provider changes:

- ignore infinite filter rectangles
- also disconnect selection connection if no supported layers were found
This commit is contained in:
Juergen E. Fischer 2014-01-01 23:30:49 +01:00
parent cb48f51905
commit a47babaf4e
2 changed files with 8 additions and 2 deletions

View File

@ -62,6 +62,8 @@ void QgsGeomColumnTypeThread::run()
mAllowGeometrylessTables ) ||
layerProperties.isEmpty() )
{
mConn->disconnect();
mConn = 0;
return;
}

View File

@ -210,8 +210,12 @@ QString QgsPostgresFeatureIterator::whereClauseRect()
if ( P->mSpatialColType == sctGeography )
{
rect = QgsRectangle( -180.0, -90.0, 180.0, 90.0 ).intersect( &rect );
if ( !rect.isFinite() )
return "false";
}
if ( !rect.isFinite() )
{
QgsMessageLog::logMessage( QObject::tr( "Infinite filter rectangle specified" ), QObject::tr( "PostGIS" ) );
return "false";
}
QString qBox;