Skip to content

Commit 8b7f403

Browse files
committedMay 7, 2020
Minimum subdivision count is 1, not 0
1 parent 6e9b7ae commit 8b7f403

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed
 

‎src/gui/layout/qgslayoutscalebarwidget.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ QgsLayoutScaleBarWidget::QgsLayoutScaleBarWidget( QgsLayoutItemScaleBar *scaleBa
3333
, mScalebar( scaleBar )
3434
{
3535
setupUi( this );
36+
37+
mNumberOfSubdivisionsSpinBox->setClearValue( 1 );
38+
3639
connect( mHeightSpinBox, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsLayoutScaleBarWidget::mHeightSpinBox_valueChanged );
3740
connect( mSegmentSizeSpinBox, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsLayoutScaleBarWidget::mSegmentSizeSpinBox_valueChanged );
3841
connect( mSegmentsLeftSpinBox, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), this, &QgsLayoutScaleBarWidget::mSegmentsLeftSpinBox_valueChanged );

‎src/ui/layout/qgslayoutscalebarwidgetbase.ui

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@
6060
<property name="geometry">
6161
<rect>
6262
<x>0</x>
63-
<y>-307</y>
64-
<width>440</width>
65-
<height>944</height>
63+
<y>0</y>
64+
<width>451</width>
65+
<height>1012</height>
6666
</rect>
6767
</property>
6868
<layout class="QVBoxLayout" name="mainLayout">
@@ -359,6 +359,9 @@
359359
<property name="prefix">
360360
<string/>
361361
</property>
362+
<property name="minimum">
363+
<number>1</number>
364+
</property>
362365
</widget>
363366
</item>
364367
<item row="7" column="0">

0 commit comments

Comments
 (0)
Please sign in to comment.