Skip to content
Permalink
Browse files

Preserve layer visibility in offline editing

  • Loading branch information
m-kuhn authored and nyalldawson committed Mar 4, 2019
1 parent 544be17 commit 66a7fffec45139b74e70f8370110b5b74d0c5927
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/core/qgsofflineediting.cpp
@@ -851,6 +851,7 @@ QgsVectorLayer *QgsOfflineEditing::copyVectorLayer( QgsVectorLayer *layer, sqlit
QgsLayerTreeNode *newLayerTreeLayerClone = newLayerTreeLayer->clone();
//copy the showFeatureCount property to the new node
newLayerTreeLayerClone->setCustomProperty( CUSTOM_SHOW_FEATURE_COUNT, layerTreeLayer->customProperty( CUSTOM_SHOW_FEATURE_COUNT ) );
newLayerTreeLayerClone->setItemVisibilityChecked( layerTreeLayer->isVisible() );
QgsLayerTreeGroup *grp = qobject_cast<QgsLayerTreeGroup *>( newLayerTreeLayer->parent() );
parentTreeGroup->insertChildNode( index, newLayerTreeLayerClone );
if ( grp )

0 comments on commit 66a7fff

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