Limit the number of potential netnames

Don't set text if outside of the clipbox.  Text is non-cached so will
get redrawn on zoom

Fixes https://gitlab.com/kicad/code/kicad/issues/13572
This commit is contained in:
Seth Hillbrand 2023-02-04 11:11:04 +01:00
parent e8397a33bb
commit 887c740c2e
1 changed files with 3 additions and 1 deletions

View File

@ -738,7 +738,9 @@ void PCB_PAINTER::draw( const PCB_TRACK* aTrack, int aLayer )
VECTOR2I textPosition = VECTOR2I textPosition =
VECTOR2D( start ) * static_cast<double>( num_names - ii ) / ( num_names + 1 ) VECTOR2D( start ) * static_cast<double>( num_names - ii ) / ( num_names + 1 )
+ VECTOR2D( end ) * static_cast<double>( ii + 1 ) / ( num_names + 1 ); + VECTOR2D( end ) * static_cast<double>( ii + 1 ) / ( num_names + 1 );
m_gal->BitmapText( netName, textPosition, textOrientation );
if( clipBox.Contains( textPosition ) )
m_gal->BitmapText( netName, textPosition, textOrientation );
} }
return; return;