From 49ac89bfed3166e02d8910bdece944cc529e1f28 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Thu, 14 Mar 2019 05:43:53 -0700 Subject: [PATCH] pcbnew: Don't refresh S_CURVE in bbox() The bounding box calculation needs to be fast and is threaded in many places in pcbnew. We cannot invalidate items (the function is const but this wasn't caught at compile-time for some reason) when getting the bbox. This shouldn't be an issue as the m_BezierPoints is rebuilt each time the curve is updated, so rebuilding during the bbox seems extra. Fixes: lp:1819984 * https://bugs.launchpad.net/kicad/+bug/1819984 (cherry picked from commit ec24981cc84e437284246995327ae4f8e54e3731) --- pcbnew/class_drawsegment.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/pcbnew/class_drawsegment.cpp b/pcbnew/class_drawsegment.cpp index 5f81397f06..88308d0cea 100644 --- a/pcbnew/class_drawsegment.cpp +++ b/pcbnew/class_drawsegment.cpp @@ -557,8 +557,6 @@ const EDA_RECT DRAWSEGMENT::GetBoundingBox() const } case S_CURVE: - // Rebuild the poly points shape - ((DRAWSEGMENT*)this)->RebuildBezierToSegmentsPointsList( m_Width ); for( unsigned ii = 0; ii < m_BezierPoints.size(); ++ii ) bbox.Merge( m_BezierPoints[ii] );