Skip to content

Commit

Permalink
- Fix default textdiagram => label placment option
Browse files Browse the repository at this point in the history
- Add warning if unknown diagram type is specified
  • Loading branch information
m-kuhn committed Aug 14, 2012
1 parent 1009c74 commit 3ab9580
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/app/qgsdiagramproperties.cpp
Expand Up @@ -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 );
Expand Down Expand Up @@ -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 )

Expand Down

0 comments on commit 3ab9580

Please sign in to comment.