mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
[WFS provider] Un-break building of offline editing database with 'Only request features overlapping the view extent' mode
This commit is contained in:
parent
c6e0ad36e8
commit
d73ec0677d
@ -501,8 +501,11 @@ int QgsWFSSharedData::registerToCache( QgsWFSFeatureIterator* iterator, QgsRecta
|
||||
// In case the request has a spatial filter, which is not the one currently
|
||||
// being downloaded, check if we have already downloaded an area of interest that includes it
|
||||
// before deciding to restart a new download with the provided area of interest.
|
||||
// But don't abort a on going download without a BBOX (Offline editing use case
|
||||
// when "Only request features overlapping the view extent" : the offline editor
|
||||
// want to request all features whereas the map renderer only the view)
|
||||
bool newDownloadNeeded = false;
|
||||
if ( !rect.isEmpty() && mRect != rect )
|
||||
if ( !rect.isEmpty() && mRect != rect && !( mDownloader && mRect.isEmpty() ) )
|
||||
{
|
||||
QList<QgsFeatureId> intersectingRequests = mCachedRegions.intersects( rect );
|
||||
newDownloadNeeded = true;
|
||||
@ -533,6 +536,12 @@ int QgsWFSSharedData::registerToCache( QgsWFSFeatureIterator* iterator, QgsRecta
|
||||
}
|
||||
}
|
||||
}
|
||||
// If there's a ongoing download with a BBOX and we request a new download
|
||||
// without it, then we need a new download.
|
||||
else if ( rect.isEmpty() && mDownloader && !mRect.isEmpty() )
|
||||
{
|
||||
newDownloadNeeded = true;
|
||||
}
|
||||
|
||||
if ( newDownloadNeeded || !mDownloader )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user