Clear Undo list when renaming
Our undo/redo list is tied to the screen that gets cleared when we reload the file after renaming. We need to clear the Undo list at this point to prevent possible crashes when moving too far back in the stack Fixes https://gitlab.com/kicad/code/kicad/issues/10504
This commit is contained in:
parent
615eda816e
commit
323a069738
|
@ -544,8 +544,11 @@ bool DIALOG_SHEET_PROPERTIES::onSheetFilenameChanged( const wxString& aNewFilena
|
|||
}
|
||||
}
|
||||
|
||||
// If we are renaming files, the undo/redo list becomes invalid and must be cleared
|
||||
if( isUndoable )
|
||||
m_frame->SaveCopyInUndoList( m_frame->GetScreen(), m_sheet, UNDO_REDO::CHANGED, false );
|
||||
else
|
||||
m_frame->ClearUndoRedoList();
|
||||
|
||||
if( renameFile )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue