Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix for not resetting numberOf(left)Segments when switching scalebar …
…unit
  • Loading branch information
rduivenvoorde authored and nyalldawson committed Aug 4, 2021
1 parent b4f8a20 commit 2ec13f6
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 2ec13f6

Please sign in to comment.