Don't fetch the root sheet's UUID out of the sheet instances.

1) we're storing it now anyway
2) the root sheet UUID is the one UUID that's *not* in the instance
array, and previously we were erroneously grabbing the first sub-sheet's
UUID (producing duplicate UUIDs).
This commit is contained in:
Jeff Young 2021-11-09 16:07:30 +00:00
parent c0a6014114
commit 54e00569d8
1 changed files with 0 additions and 11 deletions

View File

@ -1928,17 +1928,6 @@ void SCH_SEXPR_PARSER::parseSchSheetInstances( SCH_SHEET* aRootSheet, SCH_SCREEN
Expecting( "path" );
}
}
// We don't store the root sheet's KIID, so pick it up from any sheet instance paths so
// that it doesn't change on every round-trip.
for( const SCH_SHEET_INSTANCE& instance : aScreen->m_sheetInstances )
{
if( instance.m_Path.size() > 0 )
{
const_cast<KIID&>( aRootSheet->m_Uuid ) = instance.m_Path[0];
break;
}
}
}