Skip to content
Permalink
Browse files

Preserve layer visibility in offline editing

  • Loading branch information
m-kuhn committed Mar 4, 2019
1 parent af97250 commit 7c52e65bea1c9f059a09bbbdea923f6aa01a238d
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 7c52e65

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