mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
fix r15352
git-svn-id: http://svn.osgeo.org/qgis/trunk@15359 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
9e37bb3e5f
commit
17d121750c
@ -799,29 +799,15 @@ void QgsLegend::setGroupCRS( QgsLegendGroup *lg, const QgsCoordinateReferenceSys
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//delete the legend layers first
|
foreach( QgsLegendLayer *cl, lg->legendLayers() )
|
||||||
QTreeWidgetItem * child = lg->child( 0 );
|
|
||||||
while ( child )
|
|
||||||
{
|
{
|
||||||
QgsLegendLayer *cl = dynamic_cast<QgsLegendLayer *>( child );
|
|
||||||
QgsLegendGroup *cg = dynamic_cast<QgsLegendGroup *>( child );
|
|
||||||
|
|
||||||
if ( cl )
|
if ( cl )
|
||||||
{
|
{
|
||||||
cl->layer()->setCrs( crs );
|
cl->layer()->setCrs( crs );
|
||||||
}
|
}
|
||||||
else if ( cg )
|
|
||||||
{
|
|
||||||
setGroupCRS( cg, crs );
|
|
||||||
}
|
|
||||||
|
|
||||||
child = lg->child( 0 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
delete lg;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void QgsLegend::moveLayer( QgsMapLayer *ml, int groupIndex )
|
void QgsLegend::moveLayer( QgsMapLayer *ml, int groupIndex )
|
||||||
{
|
{
|
||||||
if ( !ml )
|
if ( !ml )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user