Skip to content
Permalink
Browse files

[WFS provider] Un-break building of offline editing database with 'On…

…ly request features overlapping the view extent' mode
  • Loading branch information
rouault committed Jun 24, 2016
1 parent c6e0ad3 commit d73ec0677d7d776b5b7e9e4604ea37a964ce2322
Showing with 10 additions and 1 deletion.
  1. +10 −1 src/providers/wfs/qgswfsshareddata.cpp
@@ -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 )
{

0 comments on commit d73ec06

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