Skip to content

Commit

Permalink
Minimum subdivision count is 1, not 0
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 7, 2020
1 parent 6e9b7ae commit 8b7f403
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/gui/layout/qgslayoutscalebarwidget.cpp
Expand Up @@ -33,6 +33,9 @@ QgsLayoutScaleBarWidget::QgsLayoutScaleBarWidget( QgsLayoutItemScaleBar *scaleBa
, mScalebar( scaleBar )
{
setupUi( this );

mNumberOfSubdivisionsSpinBox->setClearValue( 1 );

connect( mHeightSpinBox, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsLayoutScaleBarWidget::mHeightSpinBox_valueChanged );
connect( mSegmentSizeSpinBox, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsLayoutScaleBarWidget::mSegmentSizeSpinBox_valueChanged );
connect( mSegmentsLeftSpinBox, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), this, &QgsLayoutScaleBarWidget::mSegmentsLeftSpinBox_valueChanged );
Expand Down
9 changes: 6 additions & 3 deletions src/ui/layout/qgslayoutscalebarwidgetbase.ui
Expand Up @@ -60,9 +60,9 @@
<property name="geometry">
<rect>
<x>0</x>
<y>-307</y>
<width>440</width>
<height>944</height>
<y>0</y>
<width>451</width>
<height>1012</height>
</rect>
</property>
<layout class="QVBoxLayout" name="mainLayout">
Expand Down Expand Up @@ -359,6 +359,9 @@
<property name="prefix">
<string/>
</property>
<property name="minimum">
<number>1</number>
</property>
</widget>
</item>
<item row="7" column="0">
Expand Down

0 comments on commit 8b7f403

Please sign in to comment.