Update findnext to handle new instance data architecture.

Fixes https://gitlab.com/kicad/code/kicad/issues/11424
This commit is contained in:
Jeff Young 2022-04-26 20:20:48 +01:00
parent 47e002a33d
commit e0f2a5f07c
1 changed files with 4 additions and 5 deletions

View File

@ -538,18 +538,17 @@ int SCH_EDITOR_CONTROL::FindNext( const TOOL_EVENT& aEvent )
continue;
}
SCH_SCREEN* screen = sheet->LastScreen();
sheet->UpdateAllScreenReferences();
item = nextMatch( screen, sheet, nullptr, data );
item = nextMatch( sheet->LastScreen(), sheet, nullptr, data );
if( item )
{
m_frame->Schematic().SetCurrentSheet( *sheet );
m_frame->GetCurrentSheet().UpdateAllScreenReferences();
screen->TestDanglingEnds();
sheet->LastScreen()->TestDanglingEnds();
m_frame->SetScreen( screen );
m_frame->SetScreen( sheet->LastScreen() );
m_frame->UpdateHierarchyNavigator();
UpdateFind( ACTIONS::updateFind.MakeEvent() );