Skip to content
Permalink
Browse files
Show raster preview mini thumbnail as legend icon
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8958 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Aug 1, 2008
1 parent 3ac19d9 commit a877a1a8de6421e5e4bcc059cb69b93d4f9248b8
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/app/legend/qgslegendlayer.cpp
@@ -454,7 +454,15 @@ QPixmap QgsLegendLayer::getOriginalPixmap() const
return QgisApp::getThemePixmap("/mIconLayer.png");
}
}
else // RASTER
else if (firstLayer->type() == QgsMapLayer::RASTER)
{
QgsRasterLayer* rlayer = dynamic_cast<QgsRasterLayer*>(firstLayer);
QPixmap myPixmap(32,32);
rlayer->drawThumbnail(&myPixmap);
return myPixmap;

}
else // undefined - should never reach this
{
return QgisApp::getThemePixmap("/mIconLayer.png");
}

0 comments on commit a877a1a

Please sign in to comment.