mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Don't call GetSide in FOOTPRINT::GetBoundingBox when not needed.
CPU usage: -13% when moving a board.
This commit is contained in:
parent
48f6f837a1
commit
f5be388acd
@ -1246,7 +1246,6 @@ const BOX2I FOOTPRINT::GetBoundingBox( bool aIncludeText, bool aIncludeInvisible
|
||||
std::vector<PCB_TEXT*> texts;
|
||||
const BOARD* board = GetBoard();
|
||||
bool isFPEdit = board && board->IsFootprintHolder();
|
||||
PCB_LAYER_ID footprintSide = GetSide();
|
||||
|
||||
if( board )
|
||||
{
|
||||
@ -1270,6 +1269,9 @@ const BOX2I FOOTPRINT::GetBoundingBox( bool aIncludeText, bool aIncludeInvisible
|
||||
BOX2I bbox( m_pos );
|
||||
bbox.Inflate( pcbIUScale.mmToIU( 0.25 ) ); // Give a min size to the bbox
|
||||
|
||||
// Calculate the footprint side
|
||||
PCB_LAYER_ID footprintSide = GetSide();
|
||||
|
||||
for( BOARD_ITEM* item : m_drawings )
|
||||
{
|
||||
if( m_privateLayers.test( item->GetLayer() ) && !isFPEdit )
|
||||
|
Loading…
x
Reference in New Issue
Block a user