Skip to content

Commit

Permalink
avoid messages warning: this also avoids the warning like:
Browse files Browse the repository at this point in the history
```
QObject::connect: Cannot connect (null)::repaintRequested() to LayerPreview::refresh()
QObject::connect: Cannot connect (null)::layerCrsChanged() to LayerPreview::layerCrsChange()
```

from dbmanager when changing layer preview.
  • Loading branch information
slarosa committed Jan 23, 2016
1 parent bfad753 commit 09ce800
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gui/qgsmapcanvas.cpp
Expand Up @@ -437,6 +437,8 @@ void QgsMapCanvas::setLayerSet( QList<QgsMapCanvasLayer> &layers )
// Add check if vector layer when connecting to selectionChanged slot
// Ticket #811 - racicot
QgsMapLayer *currentLayer = layer( i );
if ( !currentLayer )
continue;
connect( currentLayer, SIGNAL( repaintRequested() ), this, SLOT( refresh() ) );
connect( currentLayer, SIGNAL( layerCrsChanged() ), this, SLOT( layerCrsChange() ) );
QgsVectorLayer *isVectLyr = qobject_cast<QgsVectorLayer *>( currentLayer );
Expand Down

0 comments on commit 09ce800

Please sign in to comment.