Skip to content

Commit

Permalink
Add missing test.
Browse files Browse the repository at this point in the history
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 committed Oct 19, 2013
1 parent 4072906 commit 91c8a3c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/composer/qgslegendmodel.cpp
Expand Up @@ -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 );
Expand Down

0 comments on commit 91c8a3c

Please sign in to comment.