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

@ -285,8 +285,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;
}