Handle DXF files with out of bounds values
First, ensure that we calculate the bbox of the imported elements.
If the total BBOX is outside our allowed value, refused to import. This
needs to be scaled or addressed in an external editor
If the bbox fits, then make sure that we clamp it such that the largest
element is still within our bounds
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18523
(cherry picked from commit a724b3d8b1)
This commit is contained in:
@@ -162,6 +162,9 @@ void COMMIT::makeEntry( EDA_ITEM* aItem, CHANGE_TYPE aType, EDA_ITEM* aCopy, BAS
|
||||
ent.m_copy = aCopy;
|
||||
ent.m_screen = aScreen;
|
||||
|
||||
// N.B. Do not throw an assertion for multiple changed items. An item can be changed multiple times
|
||||
// in a single commit such as when importing graphics and grouping them.
|
||||
|
||||
m_changedItems.insert( aItem );
|
||||
m_changes.push_back( ent );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user