Skip to content
Permalink
Browse files

Fix #11200 (Symbology changes of a layer aren't reflected in overview…

… panel)
  • Loading branch information
wonder-sk committed Sep 14, 2014
1 parent a2f5126 commit 8d0424188cfe178148bb035d58a1ed9a06d4c94f
@@ -217,8 +217,7 @@ bool QgsSymbolV2LegendNode::setData( const QVariant& value, int role )

emit dataChanged();

if ( mLayerNode->isVisible() )
vlayer->triggerRepaint();
vlayer->triggerRepaint();

return true;
}
@@ -17,6 +17,8 @@
***************************************************************************/

#include "qgsmapcanvas.h"
#include "qgsmaplayer.h"
#include "qgsmaplayerregistry.h"
#include "qgsmapoverviewcanvas.h"
#include "qgsmaprenderersequentialjob.h"
#include "qgsmaptopixel.h"
@@ -300,6 +302,11 @@ void QgsMapOverviewCanvas::mapRenderingFinished()
update();
}

void QgsMapOverviewCanvas::layerRepaintRequested()
{
refresh();
}


void QgsMapOverviewCanvas::setBackgroundColor( const QColor& color )
{
@@ -314,7 +321,21 @@ void QgsMapOverviewCanvas::setBackgroundColor( const QColor& color )
void QgsMapOverviewCanvas::setLayerSet( const QStringList& layerSet )
{
QgsDebugMsg( "layerSet: " + layerSet.join( ", " ) );

foreach ( const QString& layerID, mSettings.layers() )
{
if ( QgsMapLayer* ml = QgsMapLayerRegistry::instance()->mapLayer( layerID ) )
disconnect( ml, SIGNAL( repaintRequested() ), this, SLOT( layerRepaintRequested() ) );
}

mSettings.setLayers( layerSet );

foreach ( const QString& layerID, mSettings.layers() )
{
if ( QgsMapLayer* ml = QgsMapLayerRegistry::instance()->mapLayer( layerID ) )
connect( ml, SIGNAL( repaintRequested() ), this, SLOT( layerRepaintRequested() ) );
}

updateFullExtent();
}

@@ -74,6 +74,7 @@ class GUI_EXPORT QgsMapOverviewCanvas : public QWidget

protected slots:
void mapRenderingFinished();
void layerRepaintRequested();

protected:

0 comments on commit 8d04241

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