Skip to content

Commit

Permalink
fix r15352
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15359 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Mar 6, 2011
1 parent cfe6c08 commit d666dad
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/app/legend/qgslegend.cpp
Expand Up @@ -799,29 +799,15 @@ void QgsLegend::setGroupCRS( QgsLegendGroup *lg, const QgsCoordinateReferenceSys
return;
}

//delete the legend layers first
QTreeWidgetItem * child = lg->child( 0 );
while ( child )
foreach( QgsLegendLayer *cl, lg->legendLayers() )
{
QgsLegendLayer *cl = dynamic_cast<QgsLegendLayer *>( child );
QgsLegendGroup *cg = dynamic_cast<QgsLegendGroup *>( child );

if ( cl )
{
cl->layer()->setCrs( crs );
}
else if ( cg )
{
setGroupCRS( cg, crs );
}

child = lg->child( 0 );
}

delete lg;
}


void QgsLegend::moveLayer( QgsMapLayer *ml, int groupIndex )
{
if ( !ml )
Expand Down

0 comments on commit d666dad

Please sign in to comment.