Skip to content

Commit

Permalink
Fix for not resetting numberOf(left)Segments when switching scalebar …
Browse files Browse the repository at this point in the history
…unit
  • Loading branch information
rduivenvoorde authored and nyalldawson committed Aug 4, 2021
1 parent 06e2658 commit 20b6064
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gui/layout/qgslayoutscalebarwidget.cpp
Expand Up @@ -652,6 +652,8 @@ void QgsLayoutScaleBarWidget::mUnitsComboBox_currentIndexChanged( int index )
mScalebar->applyDefaultSize( static_cast< QgsUnitTypes::DistanceUnit >( unitData.toInt() ) );
mScalebar->update();

mNumberOfSegmentsSpinBox->setValue( mScalebar->numberOfSegments() );
mSegmentsLeftSpinBox->setValue( mScalebar->numberOfSegmentsLeft() );
mUnitLabelLineEdit->setText( mScalebar->unitLabel() );
mSegmentSizeSpinBox->setValue( mScalebar->unitsPerSegment() );
mMapUnitsPerBarUnitSpinBox->setValue( mScalebar->mapUnitsPerScaleBarUnit() );
Expand Down

0 comments on commit 20b6064

Please sign in to comment.