Skip to content
Permalink
Browse files

Minimum subdivision count is 1, not 0

  • Loading branch information
nyalldawson committed May 7, 2020
1 parent 6e9b7ae commit 8b7f403d8ee0d57c81e12df9fb1ab82ee1afe1f4
Showing with 9 additions and 3 deletions.
  1. +3 −0 src/gui/layout/qgslayoutscalebarwidget.cpp
  2. +6 −3 src/ui/layout/qgslayoutscalebarwidgetbase.ui
@@ -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 );
@@ -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">
@@ -359,6 +359,9 @@
<property name="prefix">
<string/>
</property>
<property name="minimum">
<number>1</number>
</property>
</widget>
</item>
<item row="7" column="0">

0 comments on commit 8b7f403

Please sign in to comment.
You can’t perform that action at this time.