Fix crash when changing sheet file name that contains a highlighted net.

Performing a full connectivity rebuild after changing a sheet file name
ensures that there are no stale connectivity object pointers laying around.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17011
This commit is contained in:
Wayne Stambaugh 2024-02-17 08:50:22 -05:00
parent 1717f39daf
commit 27911d9b5a
1 changed files with 4 additions and 1 deletions

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2009 Wayne Stambaugh <stambaughw@gmail.com>
* Copyright (C) 2014-2023 KiCad Developers, see CHANGELOG.txt for contributors.
* Copyright (C) 2014-2024 KiCad Developers, see CHANGELOG.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -649,6 +649,9 @@ bool DIALOG_SHEET_PROPERTIES::onSheetFilenameChanged( const wxString& aNewFilena
if( m_clearAnnotationNewItems )
*m_clearAnnotationNewItems = clearAnnotation;
// Rebuild the entire connection graph.
m_frame->RecalculateConnections( nullptr, GLOBAL_CLEANUP );
return true;
}