Use the calculated bbox for zoomFitSelection

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4120
This commit is contained in:
Jon Evans 2020-05-29 15:24:41 -04:00
parent 7fd661f06b
commit 5250215d97
1 changed files with 1 additions and 1 deletions

View File

@ -1083,7 +1083,7 @@ void SELECTION_TOOL::selectAllItemsOnSheet( wxString& aSheetPath )
void SELECTION_TOOL::zoomFitSelection()
{
//Should recalculate the view to zoom in on the selection
auto selectionBox = m_selection.ViewBBox();
auto selectionBox = m_selection.GetBoundingBox();
auto view = getView();
VECTOR2D screenSize = view->ToWorld( m_frame->GetCanvas()->GetClientSize(), false );