Skip to content
Permalink
Browse files

display symbology of plugin layers in the legend right from the begin…

…ning

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5099 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Mar 25, 2006
1 parent da61dd2 commit c9aa55b07670ad3e9e4b341c9e0a6cc42bedd4ec
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/gui/qgisapp.cpp
@@ -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

@@ -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

0 comments on commit c9aa55b

Please sign in to comment.
You can’t perform that action at this time.