From ec81f3267f0d91af94312c6a12e1431aa90a590f Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 31 Aug 2018 18:43:36 -0700 Subject: [PATCH] pcbnew: Only regenerate BBox if the item is valid Items removed from the connectivity list will not have valid parents, so we cannot update the BBox, thus we will only use the cached value. Fixes: lp:1785605 * https://bugs.launchpad.net/kicad/+bug/1785605 --- pcbnew/connectivity_algo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/connectivity_algo.h b/pcbnew/connectivity_algo.h index afac157cda..32d86414e4 100644 --- a/pcbnew/connectivity_algo.h +++ b/pcbnew/connectivity_algo.h @@ -338,7 +338,7 @@ public: const BOX2I BBox() { - if( m_dirty ) + if( m_dirty && m_valid ) { EDA_RECT box = m_parent->GetBoundingBox(); m_bbox = BOX2I( box.GetPosition(), box.GetSize() );