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:
parent
ecb9f607ed
commit
dfc17244d4
|
@ -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 );
|
item->SetFlags( IS_ROLLOVER );
|
||||||
lastRolloverItem = rolloverItem;
|
lastRolloverItem = rolloverItem;
|
||||||
|
|
Loading…
Reference in New Issue