Perf: don't search for niluuid items when moving cursor in eeschema.

Reduces CPU usage by 60% in some cases.

(cherry picked from commit 55b31030c0)
This commit is contained in:
Alex Shvartzkop 2023-07-01 05:39:41 +03:00
parent ecb9f607ed
commit dfc17244d4
1 changed files with 4 additions and 2 deletions

View File

@ -661,9 +661,11 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
}
}
if( EDA_ITEM* item = m_frame->GetItem( rolloverItem ) )
if( rolloverItem != niluuid )
{
if( !( item->GetFlags() & IS_ROLLOVER ) )
EDA_ITEM* item = m_frame->GetItem( rolloverItem );
if( item && !( item->GetFlags() & IS_ROLLOVER ) )
{
item->SetFlags( IS_ROLLOVER );
lastRolloverItem = rolloverItem;