Clear undo/redo lists when removing board layers
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17613
(cherry picked from commit 90ee5e097a
)
Co-authored-by: Jon Evans <jon@craftyjon.com>
This commit is contained in:
parent
d6a121d617
commit
585f11a01d
|
@ -505,11 +505,11 @@ bool PANEL_SETUP_LAYERS::TransferDataFromWindow()
|
|||
BOARD_ITEM* item = collector[i];
|
||||
|
||||
// Do not remove/change an item owned by a footprint
|
||||
if( dynamic_cast<FOOTPRINT*>( item->GetParentFootprint() ) )
|
||||
if( item->GetParentFootprint() )
|
||||
continue;
|
||||
|
||||
// Do not remove footprints
|
||||
if( dynamic_cast<FOOTPRINT*>( item ) )
|
||||
if( item->Type() == PCB_FOOTPRINT_T )
|
||||
continue;
|
||||
|
||||
LSET layers = item->GetLayerSet();
|
||||
|
@ -529,6 +529,9 @@ bool PANEL_SETUP_LAYERS::TransferDataFromWindow()
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Undo state may have copies of pointers deleted above
|
||||
m_frame->ClearUndoRedoList();
|
||||
}
|
||||
|
||||
m_enabledLayers = GetUILayerMask();
|
||||
|
|
Loading…
Reference in New Issue