Skip to content
Permalink
Browse files
Labeling: use over centroid for polygon labeling by default
  • Loading branch information
wonder-sk committed Jun 11, 2014
1 parent 699b8f3 commit 54e6716e1207e9df7ab20d3454669c404066f523
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/core/qgspallabeling.cpp
@@ -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

0 comments on commit 54e6716

Please sign in to comment.