Only consider pins on this unit as clickable anchors
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7987
This commit is contained in:
parent
9ce34102af
commit
f7c20c6bef
|
@ -1886,9 +1886,20 @@ void SCH_COMPONENT::ClearBrightenedPins()
|
|||
|
||||
bool SCH_COMPONENT::IsPointClickableAnchor( const wxPoint& aPos ) const
|
||||
{
|
||||
for( auto& pin : m_pins )
|
||||
for( const std::unique_ptr<SCH_PIN>& pin : m_pins )
|
||||
{
|
||||
int pin_unit = pin->GetLibPin()->GetUnit();
|
||||
int pin_convert = pin->GetLibPin()->GetConvert();
|
||||
|
||||
if( pin_unit > 0 && pin_unit != GetUnit() )
|
||||
continue;
|
||||
|
||||
if( pin_convert > 0 && pin_convert != GetConvert() )
|
||||
continue;
|
||||
|
||||
if( pin->IsPointClickableAnchor( aPos ) )
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue