Browse Source

Filter out footprints that are larger than the viewport in either direction

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2448
pull/16/head
Jon Evans 5 years ago
parent
commit
d7e9411049
  1. 3
      pcbnew/tools/selection_tool.cpp

3
pcbnew/tools/selection_tool.cpp

@ -2398,7 +2398,8 @@ void SELECTION_TOOL::GuessSelectionCandidates( GENERAL_COLLECTOR& aCollector,
if( MODULE* mod = dyn_cast<MODULE*>( aCollector[i] ) )
{
// filter out components larger than the viewport
if( mod->ViewBBox().Contains( viewport ) )
if( mod->ViewBBox().GetHeight() > viewport.GetHeight() ||
mod->ViewBBox().GetWidth() > viewport.GetWidth() )
rejected.insert( mod );
// footprints completely covered with other features have no other
// means of selection, so must be kept

Loading…
Cancel
Save