Update findnext to handle new instance data architecture.

Fixes https://gitlab.com/kicad/code/kicad/issues/11424

(cherry picked from commit e0f2a5f07c)
This commit is contained in:
Jeff Young
2022-05-09 00:36:27 +01:00
parent c63c3d1891
commit 362eec7ee3
+4 -5
View File
@@ -499,18 +499,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() );