Skip to content

Commit

Permalink
Show raster preview mini thumbnail as legend icon
Browse files Browse the repository at this point in the history
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 a877a1a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/app/legend/qgslegendlayer.cpp
Expand Up @@ -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");
}
Expand Down

0 comments on commit a877a1a

Please sign in to comment.