Handle multiple annotation in search
New schematic format needs to search client screen paths instead of maintaining multiple copies in a flat format.
This commit is contained in:
parent
6470be11c3
commit
75e4fa9b75
|
@ -425,6 +425,8 @@ int SCH_EDITOR_CONTROL::FindNext( const TOOL_EVENT& aEvent )
|
|||
SCH_SHEET_LIST schematic = m_frame->Schematic().GetSheets();
|
||||
SCH_SCREENS screens( m_frame->Schematic().Root() );
|
||||
|
||||
screens.BuildClientSheetPathList();
|
||||
|
||||
for( SCH_SCREEN* screen = screens.GetFirst(); screen; screen = screens.GetNext() )
|
||||
{
|
||||
if( afterScreen )
|
||||
|
@ -435,15 +437,13 @@ int SCH_EDITOR_CONTROL::FindNext( const TOOL_EVENT& aEvent )
|
|||
continue;
|
||||
}
|
||||
|
||||
SCH_SHEET_PATH* sheet = schematic.FindSheetForScreen( screen );
|
||||
|
||||
item = nextMatch( screen, sheet, nullptr, data );
|
||||
for( SCH_SHEET_PATH sheet : screen->GetClientSheetPaths() )
|
||||
{
|
||||
item = nextMatch( screen, &sheet, nullptr, data );
|
||||
|
||||
if( item )
|
||||
{
|
||||
wxCHECK_MSG( sheet, 0, "Sheet not found for " + screen->GetFileName() );
|
||||
|
||||
m_frame->Schematic().SetCurrentSheet( *sheet );
|
||||
m_frame->Schematic().SetCurrentSheet( sheet );
|
||||
m_frame->GetCurrentSheet().UpdateAllScreenReferences();
|
||||
|
||||
screen->TestDanglingEnds();
|
||||
|
@ -454,6 +454,10 @@ int SCH_EDITOR_CONTROL::FindNext( const TOOL_EVENT& aEvent )
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( item )
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( item )
|
||||
|
|
Loading…
Reference in New Issue