7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-11 00:30:01 +00:00

Rehash sheetpaths when changing sheet uuids.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19583
This commit is contained in:
Jeff Young 2025-01-10 16:00:06 +00:00
parent 40871a6a08
commit 234e4a2ae3
2 changed files with 6 additions and 0 deletions

View File

@ -915,6 +915,9 @@ void SCH_EDIT_FRAME::CreateScreens()
m_schematic->RootScreen()->SetPageNumber( wxT( "1" ) );
rootSheetPath.SetPageNumber( wxT( "1" ) );
// Rehash sheetpaths in heirarchy since we changed the uuid.
m_schematic->RefreshHierarchy();
if( GetScreen() == nullptr )
{
SCH_SCREEN* screen = new SCH_SCREEN( m_schematic );

View File

@ -2821,6 +2821,9 @@ int SCH_EDITOR_CONTROL::RepairSchematic( const TOOL_EVENT& aEvent )
{
errors += duplicates;
details += wxString::Format( _( "%d duplicate IDs replaced.\n" ), duplicates );
// Rehash sheetpaths as we may have changed their uuids.
m_frame->Schematic().RefreshHierarchy();
}
if( errors )