fix r15352

git-svn-id: http://svn.osgeo.org/qgis/trunk@15359 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
jef 2011-03-06 11:33:22 +00:00
parent 9e37bb3e5f
commit 17d121750c

View File

@ -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 )