PcbNew: center on items rather than zooming to them on find

Fixes: lp:1751480
* https://bugs.launchpad.net/kicad/+bug/1751480
This commit is contained in:
Jon Evans 2018-02-26 23:15:54 -05:00 committed by Maciej Suminski
parent 675bd39e8a
commit 88fb4c57e5
1 changed files with 1 additions and 3 deletions

View File

@ -1161,9 +1161,7 @@ void SELECTION_TOOL::findCallback( BOARD_ITEM* aItem )
if( aItem )
{
select( aItem );
EDA_RECT bbox = aItem->GetBoundingBox();
BOX2D viewport( VECTOR2D( bbox.GetOrigin() ), VECTOR2D( bbox.GetSize() ) );
getView()->SetViewport( viewport );
getView()->SetCenter( aItem->GetPosition() );
// Inform other potentially interested tools
m_toolMgr->ProcessEvent( SelectedEvent );