Skip to content
Permalink
Browse files
legend refresh after data reload
git-svn-id: http://svn.osgeo.org/qgis/trunk@15750 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek committed Apr 17, 2011
1 parent d7d7caf commit 191ffdff6c82f05b07d8ded8ee21ad2f56d48dd8
Showing with 9 additions and 0 deletions.
  1. +8 −0 src/app/legend/qgslegendlayer.cpp
  2. +1 −0 src/app/legend/qgslegendlayer.h
@@ -94,6 +94,10 @@ QgsLegendLayer::QgsLegendLayer( QgsMapLayer* layer )
connect( layer, SIGNAL( editingStopped() ), this, SLOT( updateIcon() ) );
connect( layer, SIGNAL( layerModified( bool ) ), this, SLOT( updateAfterLayerModification( bool ) ) );
}
if ( qobject_cast<QgsRasterLayer *>( layer ) )
{
connect( layer, SIGNAL( dataChanged() ), this, SLOT( updateAfterLayerModification() ) );
}
connect( layer, SIGNAL( layerNameChanged() ), this, SLOT( layerNameChanged() ) );

updateIcon();
@@ -545,6 +549,10 @@ void QgsLegendLayer::layerNameChanged()
setText( 0, name );
}

void QgsLegendLayer::updateAfterLayerModification()
{
updateAfterLayerModification( false );
}
void QgsLegendLayer::updateAfterLayerModification( bool onlyGeomChanged )
{
if ( onlyGeomChanged )
@@ -90,6 +90,7 @@ class QgsLegendLayer : public QgsLegendItem

/**Update symbology (e.g. to update feature count in the legend after editing operations)*/
void updateAfterLayerModification( bool onlyGeomChanged );
void updateAfterLayerModification();

void setShowFeatureCount( bool show, bool update = true );
bool showFeatureCount() const { return mShowFeatureCount; }

0 comments on commit 191ffdf

Please sign in to comment.