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:
parent
e8397a33bb
commit
887c740c2e
|
@ -738,6 +738,8 @@ 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 );
|
||||||
|
|
||||||
|
if( clipBox.Contains( textPosition ) )
|
||||||
m_gal->BitmapText( netName, textPosition, textOrientation );
|
m_gal->BitmapText( netName, textPosition, textOrientation );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue