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:
parent
b6ac603f0a
commit
084eea6781
|
@ -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() );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue