Massage an earlier fix so that mouse-clicks in tools update the highlighting.

This commit is contained in:
Jeff Young 2019-07-06 17:50:02 +01:00
parent 44734dc059
commit a3b855ac6c
3 changed files with 5 additions and 5 deletions

View File

@ -173,13 +173,13 @@ const std::string TOOL_EVENT_LIST::Format() const
bool TOOL_EVENT::IsClick( int aButtonMask ) const bool TOOL_EVENT::IsClick( int aButtonMask ) const
{ {
return m_actions == TA_MOUSE_CLICK && ( m_mouseButtons & aButtonMask ) == aButtonMask; return m_actions == TA_MOUSE_CLICK && ( m_mouseButtons & aButtonMask ) == m_mouseButtons;
} }
bool TOOL_EVENT::IsDblClick( int aButtonMask ) const bool TOOL_EVENT::IsDblClick( int aButtonMask ) const
{ {
return m_actions == TA_MOUSE_DBLCLICK && ( m_mouseButtons & aButtonMask ) == aButtonMask; return m_actions == TA_MOUSE_DBLCLICK && ( m_mouseButtons & aButtonMask ) == m_mouseButtons;
} }

View File

@ -966,7 +966,7 @@ void TOOL_MANAGER::UpdateUI( const TOOL_EVENT& aEvent )
{ {
frame->UpdateStatusBar(); frame->UpdateStatusBar();
if( !aEvent.IsMouseAction() ) if( !aEvent.IsMotion() && !aEvent.IsDrag() )
frame->SyncToolbars(); frame->SyncToolbars();
} }
} }

View File

@ -285,12 +285,12 @@ public:
bool IsDrag( int aButtonMask = BUT_ANY ) const bool IsDrag( int aButtonMask = BUT_ANY ) const
{ {
return m_actions == TA_MOUSE_DRAG && ( m_mouseButtons & aButtonMask ) == aButtonMask; return m_actions == TA_MOUSE_DRAG && ( m_mouseButtons & aButtonMask ) == m_mouseButtons;
} }
bool IsMouseUp( int aButtonMask = BUT_ANY ) const bool IsMouseUp( int aButtonMask = BUT_ANY ) const
{ {
return m_actions == TA_MOUSE_UP && ( m_mouseButtons & aButtonMask ) == aButtonMask; return m_actions == TA_MOUSE_UP && ( m_mouseButtons & aButtonMask ) == m_mouseButtons;
} }
bool IsMotion() const bool IsMotion() const