Skip to content

Commit

Permalink
no negative altitude
Browse files Browse the repository at this point in the history
  • Loading branch information
vcloarec authored and nyalldawson committed Oct 22, 2020
1 parent 16847cd commit e8c895a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/3d/qgslightswidget.cpp
Expand Up @@ -238,7 +238,7 @@ void QgsLightsWidget::setAzimuthAltitude()
whileBlocking( spinBoxAzimuth )->setValue( azimuthAngle );

if ( horizontalVectorMagnitude == 0 )
altitudeAngle = mDirectionY >= 0 ? -90 : 90;
altitudeAngle = 90;
else
altitudeAngle = -atan( mDirectionY / horizontalVectorMagnitude ) / M_PI * 180;

Expand Down
4 changes: 2 additions & 2 deletions src/ui/3d/qgslightswidget.ui
Expand Up @@ -64,7 +64,7 @@
<item>
<widget class="QStackedWidget" name="mStackedWidget">
<property name="currentIndex">
<number>0</number>
<number>2</number>
</property>
<widget class="QWidget" name="page_2"/>
<widget class="QWidget" name="page">
Expand Down Expand Up @@ -345,7 +345,7 @@
<item>
<widget class="QSlider" name="sliderAltitude">
<property name="minimum">
<number>-90</number>
<number>0</number>
</property>
<property name="maximum">
<number>90</number>
Expand Down

0 comments on commit e8c895a

Please sign in to comment.