Skip to content
Permalink
Browse files

Fix crash if undoing / redoing scale bar unit changes

  • Loading branch information
mhugent committed Aug 13, 2012
1 parent 18f2c43 commit 9a266503aab96b559b264a8dba7bac1fb006400d
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/app/composer/qgscomposerscalebarwidget.cpp
@@ -182,10 +182,11 @@ void QgsComposerScaleBarWidget::setGuiElements()

//alignment
mAlignmentComboBox->setCurrentIndex(( int )( mComposerScaleBar->alignment() ) );
blockMemberSignals( false );

//units
mUnitsComboBox->setCurrentIndex( mUnitsComboBox->findData(( int )mComposerScaleBar->units() ) );

blockMemberSignals( false );
}

//slots
@@ -420,6 +421,7 @@ void QgsComposerScaleBarWidget::on_mUnitsComboBox_currentIndexChanged( int index
{
return;
}

mComposerScaleBar->beginCommand( tr( "Scalebar unit changed" ) );
mComposerScaleBar->setUnits(( QgsComposerScaleBar::ScaleBarUnits )unitData.toInt() );
mComposerScaleBar->update();

0 comments on commit 9a26650

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