Skip to content

Commit aa3185e

Browse files
committedMar 4, 2019
Preserve layer visibility in offline editing
1 parent fb94c9a commit aa3185e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎src/core/qgsofflineediting.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,7 @@ QgsVectorLayer *QgsOfflineEditing::copyVectorLayer( QgsVectorLayer *layer, sqlit
851851
QgsLayerTreeNode *newLayerTreeLayerClone = newLayerTreeLayer->clone();
852852
//copy the showFeatureCount property to the new node
853853
newLayerTreeLayerClone->setCustomProperty( CUSTOM_SHOW_FEATURE_COUNT, layerTreeLayer->customProperty( CUSTOM_SHOW_FEATURE_COUNT ) );
854+
newLayerTreeLayerClone->setItemVisibilityChecked( layerTreeLayer->isVisible() );
854855
QgsLayerTreeGroup *grp = qobject_cast<QgsLayerTreeGroup *>( newLayerTreeLayer->parent() );
855856
parentTreeGroup->insertChildNode( index, newLayerTreeLayerClone );
856857
if ( grp )

0 commit comments

Comments
 (0)
Please sign in to comment.