Skip to content

Commit 1d504ea

Browse files
committedMar 5, 2017
Revert 38f4a6f
1 parent 4d8f886 commit 1d504ea

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed
 

‎src/core/qgsvectorlayercache.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ int QgsVectorLayerCache::cacheSize()
5858

5959
void QgsVectorLayerCache::setCacheGeometry( bool cacheGeometry )
6060
{
61-
bool shouldCache = cacheGeometry && mLayer->hasGeometryType();
62-
bool mustInvalidate = shouldCache && !mCacheGeometry; // going from no geometry -> geometry, so have to clear existing cache entries
63-
mCacheGeometry = shouldCache;
61+
bool shouldCacheGeometry = cacheGeometry && mLayer->hasGeometryType();
62+
bool mustInvalidate = shouldCacheGeometry && !mCacheGeometry; // going from no geometry -> geometry, so have to clear existing cache entries
63+
mCacheGeometry = shouldCacheGeometry;
6464
if ( cacheGeometry )
6565
{
6666
connect( mLayer, &QgsVectorLayer::geometryChanged, this, &QgsVectorLayerCache::geometryChanged );
@@ -237,7 +237,6 @@ void QgsVectorLayerCache::attributeAdded( int field )
237237
{
238238
Q_UNUSED( field )
239239
mCachedAttributes.append( field );
240-
mFullCache = false;
241240
mCache.clear();
242241
}
243242

@@ -274,7 +273,6 @@ void QgsVectorLayerCache::layerDeleted()
274273
void QgsVectorLayerCache::invalidate()
275274
{
276275
mCache.clear();
277-
mFullCache = false;
278276
emit invalidated();
279277
}
280278

‎tests/src/core/testqgsvectorlayercache.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -384,13 +384,6 @@ void TestVectorLayerCache::testCacheGeom()
384384
{
385385
QVERIFY( f.hasGeometry() );
386386
}
387-
388-
// another test...
389-
cache.setCacheGeometry( false );
390-
cache.setFullCache( true );
391-
QVERIFY( cache.hasFullCache() );
392-
cache.setCacheGeometry( true );
393-
QVERIFY( !cache.hasFullCache() );
394387
}
395388

396389
void TestVectorLayerCache::onCommittedFeaturesAdded( const QString &layerId, const QgsFeatureList &features )

0 commit comments

Comments
 (0)
Please sign in to comment.