From 0b56883322831ceafdf1ce8b645b86a4a4e037b9 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Mon, 26 Feb 2018 23:15:54 -0500 Subject: [PATCH] PcbNew: center on items rather than zooming to them on find --- pcbnew/tools/selection_tool.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 7222f6c05..80050c2ac 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -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 ); -- 2.14.1