Skip to content
Permalink
Browse files

fix crash on opening symbol levels dialog when using categorized rend…

…erer with showClassifiers
  • Loading branch information
jef-n committed May 22, 2012
1 parent 049f5ca commit fbdebd1e6504805e54a7021fc170ee99eaa090b0
Showing with 10 additions and 4 deletions.
  1. +10 −4 src/gui/symbology-ng/qgssymbollevelsv2dialog.cpp
@@ -73,12 +73,18 @@ QgsSymbolLevelsV2Dialog::QgsSymbolLevelsV2Dialog( QgsLegendSymbolList list, bool

connect( chkEnable, SIGNAL( clicked() ), this, SLOT( updateUi() ) );

if ( mList.count() > 0 && !mList[0].second )
{
// remove symbolless entry (probably classifier of categorized renderer)
mList.removeFirst();
}

int maxLayers = 0;
tableLevels->setRowCount( list.count() );
for ( int i = 0; i < list.count(); i++ )
tableLevels->setRowCount( mList.count() );
for ( int i = 0; i < mList.count(); i++ )
{
QgsSymbolV2* sym = list[i].second;
QString label = list[i].first;
QgsSymbolV2* sym = mList[i].second;
QString label = mList[i].first;

// set icons for the rows
QIcon icon = QgsSymbolLayerV2Utils::symbolPreviewIcon( sym, QSize( 16, 16 ) );

0 comments on commit fbdebd1

Please sign in to comment.
You can’t perform that action at this time.