Fix creating polygons from footprint rule areas

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10257

(cherry picked from commit e9b91b6fab)
This commit is contained in:
Jon Evans
2022-01-04 21:31:40 -05:00
parent d7e790b6c1
commit 4be56825bb
2 changed files with 10 additions and 0 deletions
+5
View File
@@ -122,12 +122,17 @@ void BOARD_COMMIT::Push( const wxString& aMessage, bool aCreateUndoEntry, bool a
int changeFlags = ent.m_type & CHT_FLAGS;
BOARD_ITEM* boardItem = static_cast<BOARD_ITEM*>( ent.m_item );
wxASSERT( ent.m_item );
// Module items need to be saved in the undo buffer before modification
if( m_isFootprintEditor )
{
// Be sure that we are storing a footprint
if( ent.m_item->Type() != PCB_FOOTPRINT_T )
{
ent.m_item = ent.m_item->GetParent();
wxASSERT( ent.m_item );
}
// We have not saved the footprint yet, so let's create an entry
if( savedModules.count( ent.m_item ) == 0 )