@@ -913,7 +913,7 @@ void GlobePlugin::updateLayers()
913
913
{
914
914
if ( mapLayer )
915
915
disconnect ( mapLayer, SIGNAL ( repaintRequested () ), this , SLOT ( layerChanged () ) );
916
- if ( dynamic_cast <QgsVectorLayer *>( mapLayer ) )
916
+ if ( qobject_cast <QgsVectorLayer *>( mapLayer ) )
917
917
disconnect ( static_cast <QgsVectorLayer *>( mapLayer ), SIGNAL ( layerTransparencyChanged ( int ) ), this , SLOT ( layerChanged () ) );
918
918
}
919
919
osgEarth::ModelLayerVector modelLayers;
@@ -927,7 +927,7 @@ void GlobePlugin::updateLayers()
927
927
QgsMapLayer *mapLayer = QgsProject::instance ()->mapLayer ( QString::fromStdString ( modelLayer->getName () ) );
928
928
if ( mapLayer )
929
929
disconnect ( mapLayer, SIGNAL ( repaintRequested () ), this , SLOT ( layerChanged () ) );
930
- if ( dynamic_cast <QgsVectorLayer *>( mapLayer ) )
930
+ if ( qobject_cast <QgsVectorLayer *>( mapLayer ) )
931
931
disconnect ( static_cast <QgsVectorLayer *>( mapLayer ), SIGNAL ( layerTransparencyChanged ( int ) ), this , SLOT ( layerChanged () ) );
932
932
if ( !selectedLayerIds.contains ( QString::fromStdString ( modelLayer->getName () ) ) )
933
933
mMapNode ->getMap ()->removeModelLayer ( modelLayer );
@@ -939,7 +939,7 @@ void GlobePlugin::updateLayers()
939
939
connect ( mapLayer, SIGNAL ( repaintRequested () ), this , SLOT ( layerChanged () ) );
940
940
941
941
QgsGlobeVectorLayerConfig *layerConfig = 0 ;
942
- if ( dynamic_cast <QgsVectorLayer *>( mapLayer ) )
942
+ if ( qobject_cast <QgsVectorLayer *>( mapLayer ) )
943
943
{
944
944
layerConfig = QgsGlobeVectorLayerConfig::getConfig ( static_cast <QgsVectorLayer *>( mapLayer ) );
945
945
connect ( static_cast <QgsVectorLayer *>( mapLayer ), SIGNAL ( layerTransparencyChanged ( int ) ), this , SLOT ( layerChanged () ) );
@@ -985,7 +985,7 @@ void GlobePlugin::layerChanged( QgsMapLayer *mapLayer )
985
985
if ( mMapNode )
986
986
{
987
987
QgsGlobeVectorLayerConfig *layerConfig = 0 ;
988
- if ( dynamic_cast <QgsVectorLayer *>( mapLayer ) )
988
+ if ( qobject_cast <QgsVectorLayer *>( mapLayer ) )
989
989
{
990
990
layerConfig = QgsGlobeVectorLayerConfig::getConfig ( static_cast <QgsVectorLayer *>( mapLayer ) );
991
991
}
0 commit comments