Skip to content

Commit 1c8eadc

Browse files
committed
[3d] When first applying a 3D map settings from a dock, also copy its camera settings
1 parent f875bb7 commit 1c8eadc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/app/layout/qgslayout3dmapwidget.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,14 @@ void QgsLayout3DMapWidget::updateCameraPoseWidgetsFromItem()
115115
void QgsLayout3DMapWidget::copy3DMapSettings()
116116
{
117117
Qgs3DMapCanvasDockWidget *dock = _dock3DViewFromSender( sender() );
118+
119+
// if this is the first settings passed on, also copy camera details
120+
if ( !mMap3D->mapSettings() )
121+
{
122+
mMap3D->setCameraPose( dock->mapCanvas3D()->cameraController()->cameraPose() );
123+
updateCameraPoseWidgetsFromItem();
124+
}
125+
118126
if ( dock )
119127
mMap3D->setMapSettings( new Qgs3DMapSettings( *dock->mapCanvas3D()->map() ) );
120128
}

0 commit comments

Comments
 (0)