@@ -298,7 +298,8 @@ QgsDiagramProperties::QgsDiagramProperties( QgsVectorLayer* layer, QWidget* pare
298298void QgsDiagramProperties::on_mDiagramTypeComboBox_currentIndexChanged ( int index )
299299{
300300 QString diagramType = mDiagramTypeComboBox ->itemData ( index ).toString ();
301- if ( diagramType == DIAGRAM_NAME_TEXT )
301+
302+ if ( DIAGRAM_NAME_TEXT == diagramType )
302303 {
303304 mLabelPlacementComboBox ->show ();
304305 mLabelPlacementLabel ->show ();
@@ -308,7 +309,7 @@ void QgsDiagramProperties::on_mDiagramTypeComboBox_currentIndexChanged( int inde
308309 mLabelPlacementLabel ->hide ();
309310 }
310311
311- if ( diagramType == DIAGRAM_NAME_HISTOGRAM )
312+ if ( DIAGRAM_NAME_HISTOGRAM == diagramType )
312313 {
313314 mBarWidthLabel ->show ();
314315 mBarWidthSpinBox ->show ();
@@ -321,7 +322,7 @@ void QgsDiagramProperties::on_mDiagramTypeComboBox_currentIndexChanged( int inde
321322 mOrientationFrame ->hide ();
322323 }
323324
324- if ( diagramType == DIAGRAM_NAME_HISTOGRAM || diagramType == DIAGRAM_NAME_TEXT )
325+ if ( DIAGRAM_NAME_HISTOGRAM == diagramType || DIAGRAM_NAME_TEXT == diagramType )
325326 {
326327 mDiagramPropertiesTabWidget ->setTabEnabled ( 3 , true );
327328 }
@@ -330,7 +331,7 @@ void QgsDiagramProperties::on_mDiagramTypeComboBox_currentIndexChanged( int inde
330331 mDiagramPropertiesTabWidget ->setTabEnabled ( 3 , false );
331332 }
332333
333- if ( diagramType == DIAGRAM_NAME_TEXT || diagramType == DIAGRAM_NAME_PIE )
334+ if ( DIAGRAM_NAME_TEXT == diagramType || DIAGRAM_NAME_PIE == diagramType )
334335 {
335336 mScaleDependencyComboBox ->show ();
336337 mScaleDependencyLabel ->show ();
0 commit comments