Skip to content

Commit 5162df6

Browse files
author
jef
committed
fix runtime warning
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11399 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent f10d1f9 commit 5162df6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/app/legend/qgslegend.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
#include "qgsattributetabledialog.h"
4141

4242
#include <cfloat>
43-
#include <iostream>
4443

4544
#include <QFont>
4645
#include <QDomDocument>
@@ -617,8 +616,11 @@ void QgsLegend::addLayer( QgsMapLayer * layer )
617616
doItemsLayout();
618617

619618
// setup connections that will update the layer icons
620-
connect( layer, SIGNAL( editingStarted() ), llayer, SLOT( updateIcon() ) );
621-
connect( layer, SIGNAL( editingStopped() ), llayer, SLOT( updateIcon() ) );
619+
if( dynamic_cast<QgsVectorLayer *>( layer ) )
620+
{
621+
connect( layer, SIGNAL( editingStarted() ), llayer, SLOT( updateIcon() ) );
622+
connect( layer, SIGNAL( editingStopped() ), llayer, SLOT( updateIcon() ) );
623+
}
622624
}
623625

624626
QgsLegendLayerFile* QgsLegend::currentLayerFile()

0 commit comments

Comments
 (0)