Skip to content

Commit 69a6f68

Browse files
author
mhugent
committedMar 25, 2006
display symbology of plugin layers in the legend right from the beginning
git-svn-id: http://svn.osgeo.org/qgis/trunk@5099 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 587b77e commit 69a6f68

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎src/gui/qgisapp.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4463,6 +4463,7 @@ void QgisApp::addVectorLayer(QString vectorLayerPath, QString baseName, QString
44634463
// give it a random color
44644464
QgsSingleSymbolRenderer *renderer = new QgsSingleSymbolRenderer(layer->vectorType()); //add single symbol renderer as default
44654465
layer->setRenderer(renderer);
4466+
layer->refreshLegend();
44664467
// add it to the mapcanvas collection
44674468
// mMapCanvas->addLayer(layer); No longer necessary since adding to registry will add to canvas
44684469

@@ -5162,6 +5163,7 @@ bool QgisApp::addRasterLayer(QFileInfo const & rasterFile, bool guiWarning)
51625163
else
51635164
{
51645165
statusBar()->message(mMapCanvas->extent().stringRep(2));
5166+
layer->refreshLegend();
51655167
mMapCanvas->freeze(false);
51665168

51675169
// Let render() do its own cursor management

0 commit comments

Comments
 (0)
Please sign in to comment.