Skip to content

Commit

Permalink
display symbology of plugin layers in the legend right from the begin…
Browse files Browse the repository at this point in the history
…ning

git-svn-id: http://svn.osgeo.org/qgis/trunk@5099 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Mar 25, 2006
1 parent 587b77e commit 69a6f68
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gui/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4463,6 +4463,7 @@ void QgisApp::addVectorLayer(QString vectorLayerPath, QString baseName, QString
// give it a random color
QgsSingleSymbolRenderer *renderer = new QgsSingleSymbolRenderer(layer->vectorType()); //add single symbol renderer as default
layer->setRenderer(renderer);
layer->refreshLegend();
// add it to the mapcanvas collection
// mMapCanvas->addLayer(layer); No longer necessary since adding to registry will add to canvas

Expand Down Expand Up @@ -5162,6 +5163,7 @@ bool QgisApp::addRasterLayer(QFileInfo const & rasterFile, bool guiWarning)
else
{
statusBar()->message(mMapCanvas->extent().stringRep(2));
layer->refreshLegend();
mMapCanvas->freeze(false);

// Let render() do its own cursor management
Expand Down

0 comments on commit 69a6f68

Please sign in to comment.