Skip to content

Commit

Permalink
Fix GetLegendGraphic with scale on Categorized or Graduated symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
Stéphane Brunner committed Oct 19, 2013
1 parent 593026f commit 7fdedf1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/composer/qgslegendmodel.cpp
Expand Up @@ -187,17 +187,17 @@ int QgsLegendModel::addVectorLayerItemsV2( QStandardItem* layerItem, QgsVectorLa

// updateSymbolV2ItemText needs layer set
updateSymbolV2ItemText( currentSymbolItem );

row++;
}
else
{
QgsComposerSymbolV2Item* currentSymbolItem = new QgsComposerSymbolV2Item( "" );
currentSymbolItem->setIcon( QgsSymbolLayerV2Utils::symbolPreviewIcon( symbolIt->second, QSize( 30, 30 ) ) );
currentSymbolItem->setSymbolV2( symbolIt->second );
layerItem->setChild( 0, 0, currentSymbolItem );
layerItem->setChild( row, 0, currentSymbolItem );
currentSymbolItem->setText( symbolIt->first );
}

row++;
}

// Don't remove row on getLegendGraphic (read only with filter)
Expand Down

0 comments on commit 7fdedf1

Please sign in to comment.