Skip to content

Commit a877a1a

Browse files
author
timlinux
committedAug 1, 2008

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed
 

‎src/app/legend/qgslegendlayer.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,15 @@ QPixmap QgsLegendLayer::getOriginalPixmap() const
454454
return QgisApp::getThemePixmap("/mIconLayer.png");
455455
}
456456
}
457-
else // RASTER
457+
else if (firstLayer->type() == QgsMapLayer::RASTER)
458+
{
459+
QgsRasterLayer* rlayer = dynamic_cast<QgsRasterLayer*>(firstLayer);
460+
QPixmap myPixmap(32,32);
461+
rlayer->drawThumbnail(&myPixmap);
462+
return myPixmap;
463+
464+
}
465+
else // undefined - should never reach this
458466
{
459467
return QgisApp::getThemePixmap("/mIconLayer.png");
460468
}

0 commit comments

Comments
 (0)
Please sign in to comment.