From c7bb6f5778788ecbe26edadb3fe0a934b0e19fac Mon Sep 17 00:00:00 2001 From: qu1ck Date: Sat, 18 Feb 2023 13:04:12 +0000 Subject: [PATCH] Treat dimensions in fp as text for bbox calculations Fixes https://gitlab.com/kicad/code/kicad/-/issues/13976 --- pcbnew/footprint.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pcbnew/footprint.cpp b/pcbnew/footprint.cpp index f9d1e3df24..ad9c57c50f 100644 --- a/pcbnew/footprint.cpp +++ b/pcbnew/footprint.cpp @@ -850,6 +850,13 @@ const BOX2I FOOTPRINT::GetBoundingBox( bool aIncludeText, bool aIncludeInvisible if( item->Type() == PCB_FP_TEXT_T ) continue; + // Treat dimension objects as text + if( !aIncludeText + && ( item->Type() == PCB_FP_DIM_ALIGNED_T || item->Type() == PCB_FP_DIM_CENTER_T + || item->Type() == PCB_FP_DIM_LEADER_T || item->Type() == PCB_FP_DIM_ORTHOGONAL_T + || item->Type() == PCB_FP_DIM_RADIAL_T ) ) + continue; + bbox.Merge( item->GetBoundingBox() ); }