Skip to content
Permalink
Browse files

Applied patch for legend refresh from plugins provided by Juergen

git-svn-id: http://svn.osgeo.org/qgis/trunk@7296 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Oct 24, 2007
1 parent a46d1b4 commit bced26a4aacc284d78e8dedd14709e0b65a403f4
Showing with 16 additions and 0 deletions.
  1. +3 −0 python/gui/qgisinterface.sip
  2. +8 −0 src/app/qgisappinterface.cpp
  3. +2 −0 src/app/qgisappinterface.h
  4. +3 −0 src/gui/qgisinterface.h
@@ -81,6 +81,9 @@ class QgisInterface : QObject
/** Return a pointer to the toolbox (where additional pages can be inserted) */
virtual QToolBox* getToolBox()=0;

/** refresh legend of a layer */
virtual void refreshLegend( QgsMapLayer * layer )=0;

signals:
/** Emited whenever current (selected) layer changes.
* The pointer to layer can be null if no layer is selected
@@ -140,3 +140,11 @@ QToolBox* QgisAppInterface::getToolBox()
{
return qgis->toolBox;
}

void QgisAppInterface::refreshLegend(QgsMapLayer *l)
{
if(l && qgis && qgis->legend())
{
qgis->legend()->refreshLayerSymbology( l->getLayerID() );
}
}
@@ -104,6 +104,8 @@ class QgisAppInterface : public QgisInterface
/** Return a pointer to the toolbox (where additional pages can be inserted) */
virtual QToolBox* getToolBox();

virtual void refreshLegend(QgsMapLayer *l);

private:

/// QgisInterface aren't copied
@@ -113,6 +113,9 @@ class GUI_EXPORT QgisInterface : public QObject
/** Return a pointer to the toolbox (where additional pages can be inserted) */
virtual QToolBox* getToolBox()=0;

/** refresh the legend of a layer */
virtual void refreshLegend(QgsMapLayer *l)=0;

signals:
/** Emited whenever current (selected) layer changes.
* The pointer to layer can be null if no layer is selected

0 comments on commit bced26a

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