Bugfix: EDA_RECT to BOX2I generated wrong boxes

The "operator BOX2I() const" of EDA_RECT produced
wrong boxes, usually much to big. It passed its
end-position as second argument to the constructor
of BOX2I. However, BOX2I expects its size as second
argument.

This caused a dramatic performance penalty in some
cases.
This commit is contained in:
Andreas Buhr 2017-12-10 23:04:23 +01:00 committed by Maciej Suminski
parent b6ac603f0a
commit 084eea6781
1 changed files with 1 additions and 1 deletions

View File

@ -227,7 +227,7 @@ public:
{ {
EDA_RECT rect( m_Pos, m_Size ); EDA_RECT rect( m_Pos, m_Size );
rect.Normalize(); rect.Normalize();
return BOX2I( rect.GetOrigin(), rect.GetEnd() ); return BOX2I( rect.GetOrigin(), rect.GetSize() );
} }
/** /**