Skip to content

Commit

Permalink
Ensure newly added point lights default to same y position of 1000 as…
Browse files Browse the repository at this point in the history
… the initial scene light
  • Loading branch information
nyalldawson committed Oct 22, 2020
1 parent ecc6bfc commit 19f79d4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/3d/qgspointlightsettings.h
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -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() );
Expand Down

0 comments on commit 19f79d4

Please sign in to comment.