Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Allow spinboxes widget to be reset to initial value
and add smaller steps to shadow bias
  • Loading branch information
DelazJ authored and nyalldawson committed Sep 24, 2020
1 parent c06482e commit f3ae29d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/app/3d/qgsshadowrenderingsettingswidget.cpp
Expand Up @@ -24,6 +24,10 @@ QgsShadowRenderingSettingsWidget::QgsShadowRenderingSettingsWidget( QWidget *par
: QWidget( parent )
{
setupUi( this );

shadowRenderinMaximumDistanceSpinBox->setClearValue( 500.00 );
shadowBiasSpinBox->setClearValue( 0.000010 );
shadowMapResolutionSpinBox->setClearValue( 2048 );
}

void QgsShadowRenderingSettingsWidget::setShadowSettings( const QgsShadowSettings &shadowSettings )
Expand Down
21 changes: 18 additions & 3 deletions src/ui/3d/shadowrenderingsettingswidget.ui
Expand Up @@ -29,7 +29,7 @@
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="shadowRenderinMaximumDistanceSpinBox">
<widget class="QgsDoubleSpinBox" name="shadowRenderinMaximumDistanceSpinBox">
<property name="suffix">
<string> map units</string>
</property>
Expand All @@ -49,13 +49,16 @@
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="shadowBiasSpinBox">
<widget class="QgsDoubleSpinBox" name="shadowBiasSpinBox">
<property name="decimals">
<number>10</number>
</property>
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.000010000000000</double>
</property>
<property name="value">
<double>0.000010000000000</double>
</property>
Expand All @@ -69,7 +72,7 @@
</widget>
</item>
<item row="3" column="1">
<widget class="QSpinBox" name="shadowMapResolutionSpinBox">
<widget class="QgsSpinBox" name="shadowMapResolutionSpinBox">
<property name="suffix">
<string> px</string>
</property>
Expand All @@ -86,6 +89,18 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QgsDoubleSpinBox</class>
<extends>QDoubleSpinBox</extends>
<header>qgsdoublespinbox.h</header>
</customwidget>
<customwidget>
<class>QgsSpinBox</class>
<extends>QSpinBox</extends>
<header>qgsspinbox.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

0 comments on commit f3ae29d

Please sign in to comment.