Skip to content

Commit

Permalink
fix crash on opening symbol levels dialog when using categorized rend…
Browse files Browse the repository at this point in the history
…erer with showClassifiers
  • Loading branch information
jef-n committed May 22, 2012
1 parent 049f5ca commit fbdebd1
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/gui/symbology-ng/qgssymbollevelsv2dialog.cpp
Expand Up @@ -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 ) );
Expand Down

0 comments on commit fbdebd1

Please sign in to comment.