From 64b71644bb0b94411447eac4a8c64b0d140f0b3b Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Wed, 29 May 2019 20:51:48 -0400 Subject: [PATCH] Zoom to fit: only consider worksheet if there are no other items (cherry picked from commit 04d6ec7de7e7f90482310311fcee416e8ed6410f) --- common/tool/common_tools.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/common/tool/common_tools.cpp b/common/tool/common_tools.cpp index 8e6bfa8831..9928005f69 100644 --- a/common/tool/common_tools.cpp +++ b/common/tool/common_tools.cpp @@ -237,14 +237,7 @@ int COMMON_TOOLS::ZoomFitScreen( const TOOL_EVENT& aEvent ) VECTOR2D screenSize = view->ToWorld( galCanvas->GetClientSize(), false ); if( bBox.GetWidth() == 0 || bBox.GetHeight() == 0 ) - { bBox = defaultBox; - } - else if( defaultBox.GetWidth() > 0 && defaultBox.GetHeight() > 0 ) - { - // Ensure worksheet is included in bounding box - bBox.Merge( defaultBox ); - } VECTOR2D vsize = bBox.GetSize(); double scale = view->GetScale() / std::max( fabs( vsize.x / screenSize.x ),