mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Performance.
This commit is contained in:
parent
598850b1f0
commit
96491132ce
@ -2243,25 +2243,6 @@ PAD* BOARD::GetPad( const PCB_TRACK* aTrace, ENDPOINT_T aEndPoint ) const
|
||||
}
|
||||
|
||||
|
||||
PAD* BOARD::GetPadFast( const VECTOR2I& aPosition, const LSET& aLayerSet ) const
|
||||
{
|
||||
for( FOOTPRINT* footprint : Footprints() )
|
||||
{
|
||||
for( PAD* pad : footprint->Pads() )
|
||||
{
|
||||
if( pad->GetPosition() != aPosition )
|
||||
continue;
|
||||
|
||||
// Pad found, it must be on the correct layer
|
||||
if( ( pad->GetLayerSet() & aLayerSet ).any() )
|
||||
return pad;
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
PAD* BOARD::GetPad( std::vector<PAD*>& aPadList, const VECTOR2I& aPosition, const LSET& aLayerSet ) const
|
||||
{
|
||||
// Search aPadList for aPosition
|
||||
|
@ -1125,17 +1125,6 @@ public:
|
||||
*/
|
||||
PAD* GetPad( const PCB_TRACK* aTrace, ENDPOINT_T aEndPoint ) const;
|
||||
|
||||
/**
|
||||
* Return pad found at \a aPosition on \a aLayerMask using the fast search method.
|
||||
* <p>
|
||||
* The fast search method only works if the pad list has already been built.
|
||||
* </p>
|
||||
* @param aPosition A VECTOR2I object containing the position to hit test.
|
||||
* @param aLayerMask A layer or layers to mask the hit test.
|
||||
* @return A pointer to a PAD object if found or NULL if not found.
|
||||
*/
|
||||
PAD* GetPadFast( const VECTOR2I& aPosition, const LSET& aLayerMask ) const;
|
||||
|
||||
/**
|
||||
* Locate the pad connected at \a aPosition on \a aLayer starting at list position
|
||||
* \a aPad
|
||||
|
@ -2817,7 +2817,7 @@ bool PCB_SELECTION_TOOL::Selectable( const BOARD_ITEM* aItem, bool checkVisibili
|
||||
const PCB_DISPLAY_OPTIONS& options = frame()->GetDisplayOptions();
|
||||
|
||||
auto visibleLayers =
|
||||
[&]()
|
||||
[&]() -> LSET
|
||||
{
|
||||
if( m_isFootprintEditor )
|
||||
{
|
||||
@ -3906,7 +3906,7 @@ void PCB_SELECTION_TOOL::FilterCollectorForFootprints( GENERAL_COLLECTOR& aColle
|
||||
}
|
||||
|
||||
auto visibleLayers =
|
||||
[&]()
|
||||
[&]() -> LSET
|
||||
{
|
||||
if( m_isFootprintEditor )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user