Skip to content

Commit

Permalink
reload 3D automatically after untwining
Browse files Browse the repository at this point in the history
  • Loading branch information
NEDJIMAbelgacem authored and wonder-sk committed Jan 23, 2021
1 parent 9486a92 commit ca9b936
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/3d/qgs3dmapscene.cpp
Expand Up @@ -852,6 +852,8 @@ void Qgs3DMapScene::addLayerEntity( QgsMapLayer *layer )
connect( layer, &QgsMapLayer::rendererChanged, this, &Qgs3DMapScene::onLayerRenderer3DChanged );
}

if ( layer->type() == QgsMapLayerType::PointCloudLayer )
connect( layer, &QgsMapLayer::renderer3DChanged, this, &Qgs3DMapScene::onLayerRenderer3DChanged );
}

void Qgs3DMapScene::removeLayerEntity( QgsMapLayer *layer )
Expand Down Expand Up @@ -880,6 +882,9 @@ void Qgs3DMapScene::removeLayerEntity( QgsMapLayer *layer )
{
disconnect( layer, &QgsMapLayer::rendererChanged, this, &Qgs3DMapScene::onLayerRenderer3DChanged );
}

if ( layer->type() == QgsMapLayerType::PointCloudLayer )
disconnect( layer, &QgsMapLayer::renderer3DChanged, this, &Qgs3DMapScene::onLayerRenderer3DChanged );
}

void Qgs3DMapScene::finalizeNewEntity( Qt3DCore::QEntity *newEntity )
Expand Down
2 changes: 2 additions & 0 deletions src/core/pointcloud/qgspointcloudlayer.cpp
Expand Up @@ -368,6 +368,8 @@ void QgsPointCloudLayer::onPointCloudIndexGenerationStateChanged( QgsPointCloudD
setRenderer( QgsApplication::pointCloudRendererRegistry()->defaultRenderer( mDataProvider.get() ) );
}
triggerRepaint();

emit renderer3DChanged();
}
}

Expand Down

0 comments on commit ca9b936

Please sign in to comment.