mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-04 00:04:25 -05:00 
			
		
		
		
	Bump default number of label candidates
Results in much nicer label placement and little to no speed regression in most cases
This commit is contained in:
		
							parent
							
								
									99521f456a
								
							
						
					
					
						commit
						ed69bf26b2
					
				@ -71,9 +71,9 @@ Pal::Pal()
 | 
			
		||||
 | 
			
		||||
  setSearch( CHAIN );
 | 
			
		||||
 | 
			
		||||
  point_p = 8;
 | 
			
		||||
  line_p = 8;
 | 
			
		||||
  poly_p = 8;
 | 
			
		||||
  point_p = 16;
 | 
			
		||||
  line_p = 50;
 | 
			
		||||
  poly_p = 30;
 | 
			
		||||
 | 
			
		||||
  showPartial = true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -71,9 +71,9 @@ class QgsLabelSorter
 | 
			
		||||
QgsLabelingEngineV2::QgsLabelingEngineV2()
 | 
			
		||||
    : mFlags( RenderOutlineLabels | UsePartialCandidates )
 | 
			
		||||
    , mSearchMethod( QgsPalLabeling::Chain )
 | 
			
		||||
    , mCandPoint( 8 )
 | 
			
		||||
    , mCandLine( 8 )
 | 
			
		||||
    , mCandPolygon( 8 )
 | 
			
		||||
    , mCandPoint( 16 )
 | 
			
		||||
    , mCandLine( 50 )
 | 
			
		||||
    , mCandPolygon( 30 )
 | 
			
		||||
    , mResults( nullptr )
 | 
			
		||||
{
 | 
			
		||||
  mResults = new QgsLabelingResults;
 | 
			
		||||
@ -342,9 +342,9 @@ void QgsLabelingEngineV2::readSettingsFromProject()
 | 
			
		||||
  bool saved = false;
 | 
			
		||||
  QgsProject* prj = QgsProject::instance();
 | 
			
		||||
  mSearchMethod = static_cast< QgsPalLabeling::Search >( prj->readNumEntry( "PAL", "/SearchMethod", static_cast< int >( QgsPalLabeling::Chain ), &saved ) );
 | 
			
		||||
  mCandPoint = prj->readNumEntry( "PAL", "/CandidatesPoint", 8, &saved );
 | 
			
		||||
  mCandLine = prj->readNumEntry( "PAL", "/CandidatesLine", 8, &saved );
 | 
			
		||||
  mCandPolygon = prj->readNumEntry( "PAL", "/CandidatesPolygon", 8, &saved );
 | 
			
		||||
  mCandPoint = prj->readNumEntry( "PAL", "/CandidatesPoint", 16, &saved );
 | 
			
		||||
  mCandLine = prj->readNumEntry( "PAL", "/CandidatesLine", 50, &saved );
 | 
			
		||||
  mCandPolygon = prj->readNumEntry( "PAL", "/CandidatesPolygon", 30, &saved );
 | 
			
		||||
 | 
			
		||||
  mFlags = 0;
 | 
			
		||||
  if ( prj->readBoolEntry( "PAL", "/ShowingCandidates", false, &saved ) ) mFlags |= DrawCandidates;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user