Skip to content
Permalink
Browse files

followup r12593

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12594 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Dec 23, 2009
1 parent 43563c4 commit e80b74e24c0fd3823dc622f499c0839d04a9e723
Showing with 4 additions and 16 deletions.
  1. +1 −16 src/app/legend/qgslegend.cpp
  2. +3 −0 src/app/legend/qgslegendlayer.cpp
@@ -504,9 +504,6 @@ void QgsLegend::addLayer( QgsMapLayer * layer )

QgsLegendLayer* llayer = new QgsLegendLayer( layer );

llayer->updateIcon();
llayer->setToolTip( 0, layer->publicSource() );

//set the correct check states
blockSignals( true );
if ( llayer->isVisible() )
@@ -1045,20 +1042,8 @@ QgsLegendLayer* QgsLegend::readLayerFromXML( QDomElement& childelem, bool& isOpe
// load layer's visibility and 'show in overview' flag
ll->setInOverview( atoi( fileElem.attribute( "isInOverview" ).toUtf8() ) );

//set the layer type icon
ll->updateIcon();
ll->setToolTip( 0, theMapLayer->publicSource() );

// setup connections that will update the layer icons
if ( qobject_cast<QgsVectorLayer *>( theMapLayer ) )
{
QgsDebugMsg( "Connecting signals for updating icons, layer " + theMapLayer->name() );
connect( theMapLayer, SIGNAL( editingStarted() ), ll, SLOT( updateIcon() ) );
connect( theMapLayer, SIGNAL( editingStopped() ), ll, SLOT( updateIcon() ) );
}

// expanded or collapsed
isOpen = ( childelem.attribute( "open" ) == "true" );
isOpen = childelem.attribute( "open" ) == "true";

//set the checkbox of the legend layer to the right state
blockSignals( true );
@@ -85,6 +85,9 @@ QgsLegendLayer::QgsLegendLayer( QgsMapLayer* layer )
connect( layer, SIGNAL( editingStopped() ), this, SLOT( updateIcon() ) );
}
connect( layer, SIGNAL( layerNameChanged() ), this, SLOT( layerNameChanged() ) );

updateIcon();
setToolTip( 0, layer->publicSource() );
}

QgsLegendLayer::~QgsLegendLayer()

0 comments on commit e80b74e

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