PNS fix dragging a single footprint

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15693
This commit is contained in:
Jon Evans 2023-09-20 11:53:32 -04:00
parent 398a336d91
commit d781d70a09
1 changed files with 3 additions and 2 deletions

View File

@ -2148,14 +2148,15 @@ int ROUTER_TOOL::InlineDrag( const TOOL_EVENT& aEvent )
std::set<FOOTPRINT*> footprints;
if( item->Type() == PCB_FOOTPRINT_T )
footprints.insert( static_cast<FOOTPRINT*>( item ) );
// We can drag multiple footprints, but not a grab-bag of items
if( selection.Size() > 1 )
{
if( item->Type() != PCB_FOOTPRINT_T )
return 0;
footprints.insert( static_cast<FOOTPRINT*>( item ) );
for( int idx = 1; idx < selection.Size(); ++idx )
{
if( static_cast<BOARD_ITEM*>( selection.GetItem( idx ) )->Type() != PCB_FOOTPRINT_T )