Skip to content

Commit

Permalink
Identify selected items based on id's rather than translated text
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Aug 16, 2012
1 parent 429eb40 commit 033bd79
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions src/app/qgsdiagramproperties.cpp
Expand Up @@ -62,19 +62,19 @@ QgsDiagramProperties::QgsDiagramProperties( QgsVectorLayer* layer, QWidget* pare

if ( layerType == QGis::Point || layerType == QGis::Polygon )
{
mPlacementComboBox->addItem( tr( "AroundPoint" ), 0 );
mPlacementComboBox->addItem( tr( "OverPoint" ), 1 );
mPlacementComboBox->addItem( tr( "Around Point" ), QgsDiagramLayerSettings::AroundPoint );
mPlacementComboBox->addItem( tr( "Over Point" ), QgsDiagramLayerSettings::OverPoint );
}

if ( layerType == QGis::Line || layerType == QGis::Polygon )
{
mPlacementComboBox->addItem( tr( "Line" ), 2 );
mPlacementComboBox->addItem( tr( "Horizontal" ), 3 );
mPlacementComboBox->addItem( tr( "Line" ), QgsDiagramLayerSettings::Line );
mPlacementComboBox->addItem( tr( "Horizontal" ), QgsDiagramLayerSettings::Horizontal );
}

if ( layerType == QGis::Polygon )
{
mPlacementComboBox->addItem( tr( "Free" ), 4 );
mPlacementComboBox->addItem( tr( "Free" ), QgsDiagramLayerSettings::Free );
}

if ( layerType == QGis::Line )
Expand All @@ -90,8 +90,8 @@ QgsDiagramProperties::QgsDiagramProperties( QgsVectorLayer* layer, QWidget* pare
mLineOptionsLabel->setVisible( false );
}

mDiagramTypeComboBox->addItem( tr( "Pie chart" ), "Pie" );
mDiagramTypeComboBox->addItem( tr( "Text diagram" ), "Text");
mDiagramTypeComboBox->addItem( tr( "Pie chart" ), DIAGRAM_NAME_PIE );
mDiagramTypeComboBox->addItem( tr( "Text diagram" ), DIAGRAM_NAME_TEXT );
mDiagramTypeComboBox->addItem( tr( "Histogram" ), DIAGRAM_NAME_HISTOGRAM );

mLabelPlacementComboBox->addItem( tr( "Height" ), QgsDiagramSettings::Height );
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsdiagramrendererv2.h
Expand Up @@ -35,7 +35,7 @@ struct CORE_EXPORT QgsDiagramLayerSettings
//avoid inclusion of QgsPalLabeling
enum Placement
{
AroundPoint, // Point / Polygon
AroundPoint = 0, // Point / Polygon
OverPoint, // Point / Polygon
Line, // Line / Polygon
Curved, // Line
Expand Down

0 comments on commit 033bd79

Please sign in to comment.