Don't update toolbars on mouse-move events.
It produces cursor-lag in some instances, and none of our state changes currently rely on mouse position. Fixes: lp:1831541 * https://bugs.launchpad.net/kicad/+bug/1831541
This commit is contained in:
parent
e4d16abcbd
commit
a91934c7b3
|
@ -301,7 +301,7 @@ void TOOL_MANAGER::RunAction( const TOOL_ACTION& aAction, bool aNow, void* aPara
|
|||
TOOL_STATE* current = m_activeState;
|
||||
processEvent( event );
|
||||
setActiveState( current );
|
||||
UpdateUI();
|
||||
UpdateUI( event );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -795,7 +795,7 @@ bool TOOL_MANAGER::ProcessEvent( const TOOL_EVENT& aEvent )
|
|||
#endif
|
||||
}
|
||||
|
||||
UpdateUI();
|
||||
UpdateUI( aEvent );
|
||||
|
||||
return hotkey_handled;
|
||||
}
|
||||
|
@ -970,13 +970,15 @@ bool TOOL_MANAGER::IsToolActive( TOOL_ID aId ) const
|
|||
}
|
||||
|
||||
|
||||
void TOOL_MANAGER::UpdateUI()
|
||||
void TOOL_MANAGER::UpdateUI( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
EDA_BASE_FRAME* frame = GetEditFrame();
|
||||
|
||||
if( frame )
|
||||
{
|
||||
frame->UpdateStatusBar();
|
||||
|
||||
if( !aEvent.IsMotion() )
|
||||
frame->SyncToolbars();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -327,9 +327,9 @@ public:
|
|||
void RunMainStack( TOOL_BASE* aTool, std::function<void()> aFunc );
|
||||
|
||||
/**
|
||||
* Synchronizes toolbars.
|
||||
* Updates the status bar and synchronizes toolbars.
|
||||
*/
|
||||
void UpdateUI();
|
||||
void UpdateUI( const TOOL_EVENT& aEvent );
|
||||
|
||||
/**
|
||||
* Pauses execution of a given tool until one or more events matching aConditions arrives.
|
||||
|
|
Loading…
Reference in New Issue