diff --git a/pcbnew/cross-probing.cpp b/pcbnew/cross-probing.cpp index 2dbf7b4481..bc8a13e0ee 100644 --- a/pcbnew/cross-probing.cpp +++ b/pcbnew/cross-probing.cpp @@ -269,7 +269,8 @@ void PCB_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline ) { auto bbSize = bbox.Inflate( bbox.GetWidth() * 0.2f ).GetSize(); auto screenSize = view->ToWorld( GetCanvas()->GetClientSize(), false ); - screenSize.x = std::max( 10.0, screenSize.x ); + // The "fabs" on x ensures the right answer when the view is flipped + screenSize.x = std::max( 10.0, fabs( screenSize.x ) ); screenSize.y = std::max( 10.0, screenSize.y ); double ratio = std::max( fabs( bbSize.x / screenSize.x ), fabs( bbSize.y / screenSize.y ) );