mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
legend refresh after data reload
git-svn-id: http://svn.osgeo.org/qgis/trunk@15750 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
d7d7caf446
commit
191ffdff6c
@ -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; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user