Skip to content
Permalink
Browse files

[3d] When first applying a 3D map settings from a dock, also copy its…

… camera settings
  • Loading branch information
nirvn committed Sep 5, 2018
1 parent f875bb7 commit 1c8eadcdcc4e9091a05e120e2359e268a4c2ce93
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/app/layout/qgslayout3dmapwidget.cpp
@@ -115,6 +115,14 @@ void QgsLayout3DMapWidget::updateCameraPoseWidgetsFromItem()
void QgsLayout3DMapWidget::copy3DMapSettings()
{
Qgs3DMapCanvasDockWidget *dock = _dock3DViewFromSender( sender() );

// if this is the first settings passed on, also copy camera details
if ( !mMap3D->mapSettings() )
{
mMap3D->setCameraPose( dock->mapCanvas3D()->cameraController()->cameraPose() );
updateCameraPoseWidgetsFromItem();
}

if ( dock )
mMap3D->setMapSettings( new Qgs3DMapSettings( *dock->mapCanvas3D()->map() ) );
}

0 comments on commit 1c8eadc

Please sign in to comment.
You can’t perform that action at this time.