mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-05 00:09:32 -04:00
[3d] Fix main annotation layer is not rendered on terrain
This commit is contained in:
parent
4da0d470bd
commit
22b00e1f50
@ -63,6 +63,8 @@
|
||||
#include "qgspointcloudlayer3drenderer.h"
|
||||
#include "qgspointcloudquerybuilder.h"
|
||||
|
||||
#include "qgsannotationlayer.h"
|
||||
|
||||
Qgs3DMapCanvasWidget::Qgs3DMapCanvasWidget( const QString &name, bool isDocked )
|
||||
: QWidget( nullptr )
|
||||
, mCanvasName( name )
|
||||
@ -860,7 +862,10 @@ void Qgs3DMapCanvasWidget::exportScene()
|
||||
|
||||
void Qgs3DMapCanvasWidget::onMainCanvasLayersChanged()
|
||||
{
|
||||
mCanvas->mapSettings()->setLayers( mMainCanvas->layers( true ) );
|
||||
QList<QgsMapLayer *> layers = mMainCanvas->layers( true );
|
||||
layers.insert( 0, QgsProject::instance()->mainAnnotationLayer() );
|
||||
|
||||
mCanvas->mapSettings()->setLayers( layers );
|
||||
}
|
||||
|
||||
void Qgs3DMapCanvasWidget::onMainCanvasColorChanged()
|
||||
|
@ -13294,11 +13294,13 @@ Qgs3DMapCanvas *QgisApp::createNewMapCanvas3D( const QString &name, Qgis::SceneM
|
||||
map->setSelectionColor( mMapCanvas->selectionColor() );
|
||||
map->setBackgroundColor( mMapCanvas->canvasColor() );
|
||||
|
||||
const QList<QgsMapLayer *> layers = mMapCanvas->layers( true );
|
||||
QList<QgsMapLayer *> layers = mMapCanvas->layers( true );
|
||||
const bool has3DBasemap = std::any_of( layers.begin(), layers.end(), []( QgsMapLayer *layer ) {
|
||||
return layer->properties().testFlag( Qgis::MapLayerProperty::Is3DBasemapLayer );
|
||||
} );
|
||||
|
||||
layers.insert( 0, QgsProject::instance()->mainAnnotationLayer() );
|
||||
|
||||
map->setLayers( layers );
|
||||
map->setTemporalRange( mMapCanvas->temporalRange() );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user