Find command zooms in found items (GAL).

This commit is contained in:
Maciej Suminski 2015-06-18 17:51:52 +02:00
parent 8964ff8922
commit fa3d074ca4
1 changed files with 3 additions and 1 deletions

View File

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