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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14305

(cherry picked from commit efac777f28)
This commit is contained in:
Jeff Young 2023-07-01 21:57:23 +01:00
parent a43adf7d4f
commit e53269c37f
1 changed files with 5 additions and 2 deletions

View File

@ -259,8 +259,11 @@ int SCH_FIND_REPLACE_TOOL::FindNext( const TOOL_EVENT& aEvent )
if( item )
{
m_frame->Schematic().SetCurrentSheet( *sheet );
m_frame->DisplayCurrentSheet();
if( m_frame->Schematic().CurrentSheet() != *sheet )
{
m_frame->Schematic().SetCurrentSheet( *sheet );
m_frame->DisplayCurrentSheet();
}
break;
}