Fix incorrect behavior when collection footprint items in collectors.cpp.

It was a bug in commit 208622699.

Fixes: lp:1803803
https://bugs.launchpad.net/kicad/+bug/1803803
This commit is contained in:
jean-pierre charras 2018-11-18 10:02:32 +01:00
parent 208622699f
commit 0ef7aeb274
1 changed files with 3 additions and 17 deletions

View File

@ -418,17 +418,11 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, void* testData )
goto exit; goto exit;
} }
} }
else if( module )
{
if( module->HitTest( m_RefPos ) && module->HitTestAccurate( m_RefPos ) )
{
Append( item );
goto exit;
}
}
else if( item->HitTest( m_RefPos ) ) else if( item->HitTest( m_RefPos ) )
{ {
Append( item ); if( !module || module->HitTestAccurate( m_RefPos ) )
Append( item );
goto exit; goto exit;
} }
} }
@ -470,14 +464,6 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, void* testData )
goto exit; goto exit;
} }
} }
else if( module )
{
if( module->HitTest( m_RefPos ) && module->HitTestAccurate( m_RefPos ) )
{
Append2nd( item );
goto exit;
}
}
else if( item->HitTest( m_RefPos ) ) else if( item->HitTest( m_RefPos ) )
{ {
Append2nd( item ); Append2nd( item );