Browse Source

Rehash sheetpaths when changing sheet uuids.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19583
pcb_db
Jeff Young 10 months ago
parent
commit
234e4a2ae3
  1. 3
      eeschema/sch_edit_frame.cpp
  2. 3
      eeschema/tools/sch_editor_control.cpp

3
eeschema/sch_edit_frame.cpp

@ -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 );

3
eeschema/tools/sch_editor_control.cpp

@ -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 )

Loading…
Cancel
Save