Prevent footprint editor snapping to footprint

Inside the footprint editor, we only want snap points from the base
elements

Fixes https://gitlab.com/kicad/code/kicad/issues/6948
This commit is contained in:
Seth Hillbrand 2021-01-05 16:07:29 -08:00
parent 166ba2f4e0
commit 71a93c71f7
1 changed files with 8 additions and 0 deletions

View File

@ -43,6 +43,7 @@ using namespace std::placeholders;
#include <painter.h>
#include <pcbnew_settings.h>
#include <tool/tool_manager.h>
#include <tools/pcb_tool_base.h>
#include <view/view.h>
#include <view/view_controls.h>
@ -275,6 +276,13 @@ std::set<BOARD_ITEM*> GRID_HELPER::queryVisible( const BOX2I& aArea,
{
BOARD_ITEM* item = static_cast<BOARD_ITEM*>( it.first );
// If we are in the footprint editor, don't use the footprint itself
if( static_cast<PCB_TOOL_BASE*>( m_toolMgr->GetCurrentTool() )->IsFootprintEditor()
&& item->Type() == PCB_FOOTPRINT_T )
{
continue;
}
// The item must be visible and on an active layer
if( view->IsVisible( item )
&& ( !isHighContrast || activeLayers.count( it.second ) )