Skip to content

Commit

Permalink
Survive when setLayerExpanded is called with a layer unknown by legend
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandro Santilli committed Dec 17, 2012
1 parent c87f9c5 commit 60c1e51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/legend/qgsapplegendinterface.cpp
Expand Up @@ -116,7 +116,7 @@ void QgsAppLegendInterface::setLayerVisible( QgsMapLayer * ml, bool visible )
void QgsAppLegendInterface::setLayerExpanded( QgsMapLayer * ml, bool expand )
{
QgsLegendLayer * item = mLegend->findLegendLayer( ml );
item->setExpanded( expand );
if ( item ) item->setExpanded( expand );
}

QStringList QgsAppLegendInterface::groups()
Expand Down

0 comments on commit 60c1e51

Please sign in to comment.