Ensure newly added point lights default to same y position of 1000 as the initial scene light

This commit is contained in:
Nyall Dawson 2020-10-22 12:47:39 +10:00
parent ecc6bfcd7a
commit 19f79d4155
2 changed files with 1 additions and 2 deletions

View File

@ -79,7 +79,7 @@ class _3D_EXPORT QgsPointLightSettings
bool operator==( const QgsPointLightSettings &other );
private:
QgsVector3D mPosition;
QgsVector3D mPosition { 0, 1000, 0 };
QColor mColor = Qt::white;
float mIntensity = 0.5;
float mConstantAttenuation = 1.0f;

View File

@ -13050,7 +13050,6 @@ void QgisApp::new3DMapCanvas()
map->setTerrainGenerator( flatTerrain );
QgsPointLightSettings defaultPointLight;
defaultPointLight.setPosition( QgsVector3D( 0, 1000, 0 ) );
defaultPointLight.setConstantAttenuation( 0 );
map->setPointLights( QList<QgsPointLightSettings>() << defaultPointLight );
map->setOutputDpi( QgsApplication::desktop()->logicalDpiX() );