EEschema/Cvpcb: make assign footprints from CvPcb undoable.
Fixes #11508 https://gitlab.com/kicad/code/kicad/issues/11508
This commit is contained in:
parent
772bdc4bbf
commit
40c75c74fa
|
@ -47,6 +47,7 @@ void SCH_EDITOR_CONTROL::AssignFootprints( const std::string& aChangedSetOfRefer
|
||||||
SCH_REFERENCE_LIST refs;
|
SCH_REFERENCE_LIST refs;
|
||||||
SCH_SHEET_LIST sheets = m_frame->Schematic().GetSheets();
|
SCH_SHEET_LIST sheets = m_frame->Schematic().GetSheets();
|
||||||
bool isChanged = false;
|
bool isChanged = false;
|
||||||
|
bool appendToUndoList = false;
|
||||||
|
|
||||||
sheets.GetSymbols( refs, false );
|
sheets.GetSymbols( refs, false );
|
||||||
|
|
||||||
|
@ -96,6 +97,12 @@ void SCH_EDITOR_CONTROL::AssignFootprints( const std::string& aChangedSetOfRefer
|
||||||
if( oldfp != footprint )
|
if( oldfp != footprint )
|
||||||
{
|
{
|
||||||
isChanged = true;
|
isChanged = true;
|
||||||
|
SCH_SCREEN* screen = refs[ii].GetSheetPath().LastScreen();
|
||||||
|
|
||||||
|
m_frame->SaveCopyInUndoList( screen, symbol, UNDO_REDO::CHANGED,
|
||||||
|
appendToUndoList, false );
|
||||||
|
appendToUndoList = true;
|
||||||
|
|
||||||
symbol->SetFootprint( sheetPath, footprint );
|
symbol->SetFootprint( sheetPath, footprint );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue