Skip to content
Permalink
Browse files
Fixed a crash when refreshing layer symbology - if the currently sele…
…cted item has been removed (#3326 and #3003)

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14934 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Dec 16, 2010
1 parent 0e6093f commit d5a55a9c26a2157aec734fb552e857f5ba940df1
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/app/legend/qgslegend.cpp
@@ -1474,7 +1474,7 @@ void QgsLegend::refreshLayerSymbology( QString key, bool expandItem )
}

//store the current item
QTreeWidgetItem* theCurrentItem = currentItem();
QModelIndex currentItemIndex( currentIndex() );

double widthScale = 1.0;
if ( mMapCanvas && mMapCanvas->map() )
@@ -1485,7 +1485,7 @@ void QgsLegend::refreshLayerSymbology( QString key, bool expandItem )
theLegendLayer->refreshSymbology( key, widthScale );

//restore the current item again
setCurrentItem( theCurrentItem );
setCurrentIndex( currentItemIndex );
adjustIconSize();
if ( expandItem )
{

0 comments on commit d5a55a9

Please sign in to comment.