Do not cache board bounding box

This commit is contained in:
Maciej Suminski 2017-03-03 10:57:48 +01:00
parent a073a90c45
commit 2483dab72f
2 changed files with 1 additions and 11 deletions

View File

@ -1123,8 +1123,6 @@ EDA_RECT BOARD::ComputeBoundingBox( bool aBoardEdgesOnly ) const
} }
} }
m_BoundingBox = area; // save for BOARD::GetBoundingBox()
return area; return area;
} }

View File

@ -185,7 +185,6 @@ private:
int m_fileFormatVersionAtLoad; ///< the version loaded from the file int m_fileFormatVersionAtLoad; ///< the version loaded from the file
mutable EDA_RECT m_BoundingBox;
NETINFO_LIST m_NetInfo; ///< net info list (name, design constraints .. NETINFO_LIST m_NetInfo; ///< net info list (name, design constraints ..
RN_DATA* m_ratsnest; RN_DATA* m_ratsnest;
@ -823,19 +822,12 @@ public:
* calculates the bounding box containing all board items (or board edge segments). * calculates the bounding box containing all board items (or board edge segments).
* @param aBoardEdgesOnly is true if we are interested in board edge segments only. * @param aBoardEdgesOnly is true if we are interested in board edge segments only.
* @return EDA_RECT - the board's bounding box * @return EDA_RECT - the board's bounding box
* @see PCB_BASE_FRAME::GetBoardBoundingBox() which calls this and doctors the result
*/ */
EDA_RECT ComputeBoundingBox( bool aBoardEdgesOnly = false ) const; EDA_RECT ComputeBoundingBox( bool aBoardEdgesOnly = false ) const;
/**
* Function GetBoundingBox
* may be called soon after ComputeBoundingBox() to return the same EDA_RECT,
* as long as the BOARD has not changed. Remember, ComputeBoundingBox()'s
* aBoardEdgesOnly argument is considered in this return value also.
*/
const EDA_RECT GetBoundingBox() const override const EDA_RECT GetBoundingBox() const override
{ {
return ComputeBoundingBox(); return ComputeBoundingBox( false );
} }
/** /**