Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f810e98

Browse files
committedMar 19, 2019
Preserve layer visibility in offline editing
1 parent 9383b00 commit f810e98

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.