Skip to content
Permalink
Browse files

Identify selected items based on id's rather than translated text

  • Loading branch information
m-kuhn committed Aug 16, 2012
1 parent 429eb40 commit 033bd79762a75d0963af64c26f76902c2d9a9de7
Showing with 8 additions and 8 deletions.
  1. +7 −7 src/app/qgsdiagramproperties.cpp
  2. +1 −1 src/core/qgsdiagramrendererv2.h
@@ -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 )
@@ -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 );
@@ -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

0 comments on commit 033bd79

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