Skip to content
Permalink
Browse files

Add missing test.

Witout this the scaleFactor in MM becomes 0.
Than we enter in a loop. For example on a GetLegendGraphic with a
line style as Steps
  • Loading branch information
Stéphane Brunner
Stéphane Brunner committed Oct 19, 2013
1 parent 4072906 commit 91c8a3cd229c18a64595324cf090748e46e2b0c5
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/core/composer/qgslegendmodel.cpp
@@ -191,7 +191,10 @@ int QgsLegendModel::addVectorLayerItemsV2( QStandardItem* layerItem, QgsVectorLa
else
{
QgsComposerSymbolV2Item* currentSymbolItem = new QgsComposerSymbolV2Item( "" );
currentSymbolItem->setIcon( QgsSymbolLayerV2Utils::symbolPreviewIcon( symbolIt->second, QSize( 30, 30 ) ) );
if ( mHasTopLevelWindow ) //only use QIcon / QPixmap if we have a running x-server
{
currentSymbolItem->setIcon( QgsSymbolLayerV2Utils::symbolPreviewIcon( symbolIt->second, QSize( 30, 30 ) ) );
}
currentSymbolItem->setSymbolV2( symbolIt->second );
layerItem->setChild( row, 0, currentSymbolItem );
currentSymbolItem->setText( symbolIt->first );

0 comments on commit 91c8a3c

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