Skip to content
Permalink
Browse files

- Fix default textdiagram => label placment option

- Add warning if unknown diagram type is specified
  • Loading branch information
m-kuhn committed Aug 14, 2012
1 parent 1009c74 commit 3ab9580cfd16a9b994fabd9102159fa5b1acd459
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/app/qgsdiagramproperties.cpp
@@ -128,7 +128,7 @@ QgsDiagramProperties::QgsDiagramProperties( QgsVectorLayer* layer, QWidget* pare
mDisplayDiagramsGroupBox->setChecked( false );
mFixedSizeCheckBox->setChecked( true );
mDiagramUnitComboBox->setCurrentIndex( mDiagramUnitComboBox->findText( tr( "mm" ) ) );
mLabelPlacementComboBox->setCurrentIndex( mLabelPlacementComboBox->findText( tr( "XHeight" ) ) );
mLabelPlacementComboBox->setCurrentIndex( mLabelPlacementComboBox->findText( tr( "x-height" ) ) );
mDiagramSizeSpinBox->setValue( 30 );
mBarWidthSpinBox->setValue( 5 );
mVisibilityGroupBox->setChecked( false );
@@ -278,6 +278,12 @@ QgsDiagramProperties::QgsDiagramProperties( QgsVectorLayer* layer, QWidget* pare
{
mDiagramTypeComboBox->setCurrentIndex( mDiagramTypeComboBox->findText( tr( "Histogram" ) ) );
}
else
{
QMessageBox::warning( this, tr( "Unknown diagram type." ),
tr( "The diagram type '%s' is unknown. A default type is selected for you." ).arg( diagramName ), QMessageBox::Ok );
mDiagramTypeComboBox->setCurrentIndex( mDiagramTypeComboBox->findText( tr( "Pie chart" ) ) );
}
}
} // if ( !dr )

0 comments on commit 3ab9580

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