Skip to content
Permalink
Browse files

Revert 38f4a6f

  • Loading branch information
nyalldawson committed Mar 5, 2017
1 parent 4d8f886 commit 1d504ea376e6873a99aec501e0f7ca17d417b9aa
Showing with 3 additions and 12 deletions.
  1. +3 −5 src/core/qgsvectorlayercache.cpp
  2. +0 −7 tests/src/core/testqgsvectorlayercache.cpp
@@ -58,9 +58,9 @@ int QgsVectorLayerCache::cacheSize()

void QgsVectorLayerCache::setCacheGeometry( bool cacheGeometry )
{
bool shouldCache = cacheGeometry && mLayer->hasGeometryType();
bool mustInvalidate = shouldCache && !mCacheGeometry; // going from no geometry -> geometry, so have to clear existing cache entries
mCacheGeometry = shouldCache;
bool shouldCacheGeometry = cacheGeometry && mLayer->hasGeometryType();
bool mustInvalidate = shouldCacheGeometry && !mCacheGeometry; // going from no geometry -> geometry, so have to clear existing cache entries
mCacheGeometry = shouldCacheGeometry;
if ( cacheGeometry )
{
connect( mLayer, &QgsVectorLayer::geometryChanged, this, &QgsVectorLayerCache::geometryChanged );
@@ -237,7 +237,6 @@ void QgsVectorLayerCache::attributeAdded( int field )
{
Q_UNUSED( field )
mCachedAttributes.append( field );
mFullCache = false;
mCache.clear();
}

@@ -274,7 +273,6 @@ void QgsVectorLayerCache::layerDeleted()
void QgsVectorLayerCache::invalidate()
{
mCache.clear();
mFullCache = false;
emit invalidated();
}

@@ -384,13 +384,6 @@ void TestVectorLayerCache::testCacheGeom()
{
QVERIFY( f.hasGeometry() );
}

// another test...
cache.setCacheGeometry( false );
cache.setFullCache( true );
QVERIFY( cache.hasFullCache() );
cache.setCacheGeometry( true );
QVERIFY( !cache.hasFullCache() );
}

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

0 comments on commit 1d504ea

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