Browse Source

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

(cherry picked from commit 323a069738)
7.0
Seth Hillbrand 4 years ago
parent
commit
16aca901df
  1. 3
      eeschema/dialogs/dialog_sheet_properties.cpp

3
eeschema/dialogs/dialog_sheet_properties.cpp

@ -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…
Cancel
Save