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

Reduces CPU usage by 60% in some cases.
This commit is contained in:
Alex Shvartzkop 2023-07-01 05:39:41 +03:00
parent 9eeb609248
commit 55b31030c0
1 changed files with 4 additions and 2 deletions

View File

@ -670,9 +670,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;