diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index f4ccf4f817..fc97369cb4 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -338,9 +338,6 @@ public: if( !( m_category & aEvent.m_category ) ) return false; - if( !( m_actions & aEvent.m_actions ) ) - return false; - if( m_category == TC_COMMAND || m_category == TC_MESSAGE ) { if( (bool) m_commandStr && (bool) aEvent.m_commandStr ) @@ -350,6 +347,15 @@ public: return *m_commandId == *aEvent.m_commandId; } + // BUGFIX: TA_ANY should match EVERYTHING, even TA_NONE (for TC_MESSAGE) + if( m_actions == TA_ANY && aEvent.m_actions == TA_NONE && aEvent.m_category == TC_MESSAGE ) + return true; + + // BUGFIX: This check must happen after the TC_COMMAND check because otherwise events of + // the form { TC_COMMAND, TA_NONE } will be incorrectly skipped + if( !( m_actions & aEvent.m_actions ) ) + return false; + return true; }