Skip to content
Permalink
Browse files

Add test for preserving layer visibility on offline editing

  • Loading branch information
m-kuhn committed Mar 4, 2019
1 parent aa3185e commit 62dc9452a9693e677873c5a16774d79f30df2517
Showing with 2 additions and 0 deletions.
  1. +2 −0 tests/src/core/testqgsofflineediting.cpp
@@ -152,6 +152,7 @@ void TestQgsOfflineEditing::createGeopackageAndSynchronizeBack()
//set on LayerTreeNode showFeatureCount property
QgsLayerTreeLayer *layerTreelayer = QgsProject::instance()->layerTreeRoot()->findLayer( mpLayer->id() );
layerTreelayer->setCustomProperty( QStringLiteral( "showFeatureCount" ), 1 );
layerTreelayer->setItemVisibilityChecked( false );

//convert
mOfflineEditing->convertToOfflineProject( offlineDataPath, offlineDbFile, layerIds, false, QgsOfflineEditing::GPKG );
@@ -164,6 +165,7 @@ void TestQgsOfflineEditing::createGeopackageAndSynchronizeBack()
//check LayerTreeNode showFeatureCount property
layerTreelayer = QgsProject::instance()->layerTreeRoot()->findLayer( mpLayer->id() );
QCOMPARE( layerTreelayer->customProperty( QStringLiteral( "showFeatureCount" ), 0 ).toInt(), 1 );
QCOMPARE( layerTreelayer->isVisible(), false );

QgsFeature firstFeatureInAction;
it = mpLayer->getFeatures();

0 comments on commit 62dc945

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