Skip to content

Commit

Permalink
[3d] When first applying a 3D map settings from a dock, also copy its…
Browse files Browse the repository at this point in the history
… camera settings
  • Loading branch information
nirvn committed Sep 5, 2018
1 parent f875bb7 commit 1c8eadc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/app/layout/qgslayout3dmapwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() ) );
}
Expand Down

0 comments on commit 1c8eadc

Please sign in to comment.