[QGIS Commit] r11405 - trunk/qgis/src/app/legend
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Mon Aug 17 05:52:13 EDT 2009
Author: homann
Date: 2009-08-17 05:52:12 -0400 (Mon, 17 Aug 2009)
New Revision: 11405
Modified:
trunk/qgis/src/app/legend/qgslegend.cpp
Log:
Adding connection of signals when reading legend layers from project XML file. Fixes #1760
Modified: trunk/qgis/src/app/legend/qgslegend.cpp
===================================================================
--- trunk/qgis/src/app/legend/qgslegend.cpp 2009-08-17 08:48:20 UTC (rev 11404)
+++ trunk/qgis/src/app/legend/qgslegend.cpp 2009-08-17 09:52:12 UTC (rev 11405)
@@ -616,11 +616,12 @@
doItemsLayout();
// setup connections that will update the layer icons
- if( dynamic_cast<QgsVectorLayer *>( layer ) )
+ if ( dynamic_cast<QgsVectorLayer *>( layer ) )
{
+ QgsDebugMsg( "Connecting signals for updating icons, layer " + layer->name() );
connect( layer, SIGNAL( editingStarted() ), llayer, SLOT( updateIcon() ) );
connect( layer, SIGNAL( editingStopped() ), llayer, SLOT( updateIcon() ) );
- }
+ }
}
QgsLegendLayerFile* QgsLegend::currentLayerFile()
@@ -1216,6 +1217,14 @@
theLegendLayerFile->updateLegendItem();
refreshLayerSymbology( theMapLayer->getLayerID() );
+
+ // setup connections that will update the layer icons
+ if ( dynamic_cast<QgsVectorLayer *>( theMapLayer ) )
+ {
+ QgsDebugMsg( "Connecting signals for updating icons, layer " + theMapLayer->name() );
+ connect( theMapLayer, SIGNAL( editingStarted() ), lastLayer, SLOT( updateIcon() ) );
+ connect( theMapLayer, SIGNAL( editingStopped() ), lastLayer, SLOT( updateIcon() ) );
+ }
}
}
else if ( childelem.tagName() == "filegroup" )
More information about the QGIS-commit
mailing list