Skip to content
Permalink
Browse files
Fix #11382 (keep check state of the moved layer)
Cloning of the existing node will preserve the check state, in addition
it will keep other custom properties that would be lost prevously.
  • Loading branch information
wonder-sk committed Oct 21, 2014
1 parent 697ebff commit 3546b325a5c335ac960494259bb006514111c08d
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/app/legend/qgsapplegendinterface.cpp
@@ -85,7 +85,7 @@ void QgsAppLegendInterface::moveLayer( QgsMapLayer * ml, int groupIndex )
if ( !nodeLayer || !QgsLayerTree::isGroup( nodeLayer->parent() ) )
return;

group->insertLayer( 0, ml );
group->insertChildNode( 0, nodeLayer->clone() );

QgsLayerTreeGroup* nodeLayerParentGroup = QgsLayerTree::toGroup( nodeLayer->parent() );
nodeLayerParentGroup->removeChildNode( nodeLayer );

0 comments on commit 3546b32

Please sign in to comment.