mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
applied patch from Juergen to refresh layer legend from plugin
git-svn-id: http://svn.osgeo.org/qgis/trunk@7112 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
6849f37cd7
commit
2a827fb691
@ -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,8 @@ QToolBox* QgisAppInterface::getToolBox()
|
||||
{
|
||||
return qgis->toolBox;
|
||||
}
|
||||
|
||||
void QgisAppInterface::refreshLegend(QgsMapLayer *l)
|
||||
{
|
||||
qgis->legend()->refreshLayerSymbology(l->getLayerID());
|
||||
}
|
||||
|
@ -104,6 +104,9 @@ class QgisAppInterface : public QgisInterface
|
||||
/** Return a pointer to the toolbox (where additional pages can be inserted) */
|
||||
virtual QToolBox* getToolBox();
|
||||
|
||||
/** refresh the legend of a layer */
|
||||
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
|
||||
|
@ -1017,6 +1017,8 @@ void QgsMapCanvas::updateMap()
|
||||
// XXX updating is not possible since we're already in paint loop
|
||||
// mCanvas->update();
|
||||
// QApplication::processEvents();
|
||||
QPainter p(this);
|
||||
p.drawPixmap(0, 0, mMap->pixmap());
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user