Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 9, 2020
1 parent b1625ee commit 3148d4c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -5819,13 +5819,15 @@ QgsPointCloudLayer *QgisApp::addPointCloudLayerPrivate( const QString &uri, cons
layer->loadDefaultStyle( ok );
layer->loadDefaultMetadata( ok );

#ifdef HAVE_3D
if ( !layer->renderer3D() )
{
// for point clouds we default to a 3d renderer. it just makes sense :)
std::unique_ptr< QgsPointCloudLayer3DRenderer > renderer3D = Qgs3DAppUtils::convert2dPointCloudRendererTo3d( layer->renderer() );
if ( renderer3D )
layer->setRenderer3D( renderer3D.release() );
}
#endif

QgsProject::instance()->addMapLayer( layer.get() );
activateDeactivateLayerRelatedActions( activeLayer() );
Expand Down

0 comments on commit 3148d4c

Please sign in to comment.