Skip to content

Commit

Permalink
Labeling: use over centroid for polygon labeling by default
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Jun 11, 2014
1 parent 699b8f3 commit 54e6716
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/core/qgspallabeling.cpp
Expand Up @@ -852,7 +852,14 @@ void QgsPalLayerSettings::readDataDefinedProperty( QgsVectorLayer* layer,
void QgsPalLayerSettings::readFromLayer( QgsVectorLayer* layer )
{
if ( layer->customProperty( "labeling" ).toString() != QString( "pal" ) )
{
// for polygons the "over point" (over centroid) placement is better than the default
// "around point" (around centroid) which is more suitable for points
if ( layer->geometryType() == QGis::Polygon )
placement = OverPoint;

return; // there's no information available
}

// NOTE: set defaults for newly added properties, for backwards compatibility

Expand Down

0 comments on commit 54e6716

Please sign in to comment.