Set selection reference point to top-left item.
Fixes: lp:1771016 * https://bugs.launchpad.net/kicad/+bug/1771016
This commit is contained in:
parent
e855b244ae
commit
3bf24fae7a
|
@ -767,10 +767,16 @@ int PCBNEW_CONTROL::placeBoardItems( std::vector<BOARD_ITEM*>& aItems, bool aIsN
|
||||||
editTool->GetCurrentCommit()->Added( item );
|
editTool->GetCurrentCommit()->Added( item );
|
||||||
}
|
}
|
||||||
|
|
||||||
selection.SetReferencePoint( VECTOR2I( 0, 0 ) );
|
if( selection.Size() > 0 )
|
||||||
|
{
|
||||||
|
BOARD_ITEM* item = (BOARD_ITEM*) selection.GetTopLeftItem();
|
||||||
|
|
||||||
m_toolMgr->ProcessEvent( EVENTS::SelectedEvent );
|
selection.SetReferencePoint( item->GetPosition() );
|
||||||
m_toolMgr->RunAction( PCB_ACTIONS::move, true );
|
getViewControls()->SetCursorPosition( getViewControls()->GetMousePosition(), false );
|
||||||
|
|
||||||
|
m_toolMgr->ProcessEvent( EVENTS::SelectedEvent );
|
||||||
|
m_toolMgr->RunAction( PCB_ACTIONS::move, true );
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue