From 0ef7aeb27439a4757358eed740b07025e65f7789 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 18 Nov 2018 10:02:32 +0100 Subject: [PATCH] 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 --- pcbnew/collectors.cpp | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/pcbnew/collectors.cpp b/pcbnew/collectors.cpp index 040191cb54..0d4eff7ec7 100644 --- a/pcbnew/collectors.cpp +++ b/pcbnew/collectors.cpp @@ -418,17 +418,11 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, void* testData ) goto exit; } } - else if( module ) - { - if( module->HitTest( m_RefPos ) && module->HitTestAccurate( m_RefPos ) ) - { - Append( item ); - goto exit; - } - } else if( item->HitTest( m_RefPos ) ) { - Append( item ); + if( !module || module->HitTestAccurate( m_RefPos ) ) + Append( item ); + goto exit; } } @@ -470,14 +464,6 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, void* testData ) goto exit; } } - else if( module ) - { - if( module->HitTest( m_RefPos ) && module->HitTestAccurate( m_RefPos ) ) - { - Append2nd( item ); - goto exit; - } - } else if( item->HitTest( m_RefPos ) ) { Append2nd( item );