Don't DisplayCurrentSheet() if we're already on it.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14305
This commit is contained in:
Jeff Young 2023-07-01 21:57:23 +01:00
parent bcfb6e4888
commit efac777f28
1 changed files with 5 additions and 2 deletions

View File

@ -284,9 +284,12 @@ int SCH_FIND_REPLACE_TOOL::FindNext( const TOOL_EVENT& aEvent )
item = nextMatch( sheet->LastScreen(), sheet, nullptr, data, isReversed );
if( item )
{
if( m_frame->Schematic().CurrentSheet() != *sheet )
{
m_frame->Schematic().SetCurrentSheet( *sheet );
m_frame->DisplayCurrentSheet();
}
break;
}