From 3329affc120c9db9421c8872fe5a071259785a53 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Sat, 17 Feb 2024 09:42:13 -0500 Subject: [PATCH] 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 --- eeschema/dialogs/dialog_sheet_properties.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eeschema/dialogs/dialog_sheet_properties.cpp b/eeschema/dialogs/dialog_sheet_properties.cpp index f637cd2703..ce8a16b9fd 100644 --- a/eeschema/dialogs/dialog_sheet_properties.cpp +++ b/eeschema/dialogs/dialog_sheet_properties.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2009 Wayne Stambaugh - * 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 @@ -667,6 +667,9 @@ bool DIALOG_SHEET_PROPERTIES::onSheetFilenameChanged( const wxString& aNewFilena if( m_clearAnnotationNewItems ) *m_clearAnnotationNewItems = clearAnnotation; + // Rebuild the entire connection graph. + m_frame->RecalculateConnections( GLOBAL_CLEANUP ); + return true; }