Skip to content
Permalink
Browse files

added currentLayerChanged signal

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5111 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek
rblazek committed Mar 29, 2006
1 parent 07508ab commit 17e39b8631cee063d2407d0a8003350918cdb3d5
Showing with 7 additions and 2 deletions.
  1. +4 −2 src/legend/qgslegend.cpp
  2. +3 −0 src/legend/qgslegend.h
@@ -87,14 +87,16 @@ QgsLegend::~QgsLegend()

void QgsLegend::handleCurrentItemChanged(QTreeWidgetItem* current, QTreeWidgetItem* previous)
{
QgsMapLayer *layer = currentLayer();
if(mApp)
{
mApp->activateDeactivateLayerRelatedActions(currentLayer());
mApp->activateDeactivateLayerRelatedActions( layer );
}
if(mMapCanvas)
{
mMapCanvas->setCurrentLayer(currentLayer());
mMapCanvas->setCurrentLayer( layer );
}
emit currentLayerChanged ( layer );
}

void QgsLegend::addGroup()
@@ -327,5 +327,8 @@ this item may be moved back to the original position with resetToInitialPosition
signals:
void zOrderChanged(QgsLegend * lv);

//! Emited whenever current (selected) layer changes
// the pointer to layer can be null if no layer is selected
void currentLayerChanged ( QgsMapLayer * layer );
};
#endif

0 comments on commit 17e39b8

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