Loading common/tool/tool_manager.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -448,8 +448,8 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) { if( st->waitEvents.Matches( aEvent ) ) { // By default, already processed events are not passed further m_passEvent = false; // By default, only messages are passed further m_passEvent = ( aEvent.m_category == TC_MESSAGE ); // got matching event? clear wait list and wake up the coroutine st->wakeupEvent = aEvent; Loading include/tool/tool_action.h +10 −0 Original line number Diff line number Diff line Loading @@ -148,6 +148,8 @@ public: { if( IsActivation() ) return TOOL_EVENT( TC_COMMAND, TA_ACTIVATE, m_name, m_scope ); else if( IsNotification() ) return TOOL_EVENT( TC_MESSAGE, TA_ANY, m_name, m_scope ); else return TOOL_EVENT( TC_COMMAND, TA_ACTION, m_name, m_scope ); } Loading Loading @@ -192,6 +194,14 @@ public: return m_flags & AF_ACTIVATE; } /** * Returns true if the action is a notification. */ bool IsNotification() const { return m_flags & AF_NOTIFY; } private: friend class ACTION_MANAGER; Loading include/tool/tool_event.h +2 −1 Original line number Diff line number Diff line Loading @@ -130,7 +130,8 @@ enum TOOL_ACTION_SCOPE enum TOOL_ACTION_FLAGS { AF_NONE = 0, AF_ACTIVATE = 1 ///> Action activates a tool AF_ACTIVATE = 1, ///> Action activates a tool AF_NOTIFY = 2 ///> Action is a notification (it is by default passed to all tools) }; /// Defines when a context menu is opened. Loading pcbnew/tools/common_actions.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -264,7 +264,7 @@ TOOL_ACTION COMMON_ACTIONS::viaSizeDec( "pcbnew.EditorControl.viaSizeDec", TOOL_ACTION COMMON_ACTIONS::trackViaSizeChanged( "pcbnew.EditorControl.trackViaSizeChanged", AS_GLOBAL, 0, "", "" ); "", "", AF_NOTIFY ); // Module editor tools Loading Loading
common/tool/tool_manager.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -448,8 +448,8 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) { if( st->waitEvents.Matches( aEvent ) ) { // By default, already processed events are not passed further m_passEvent = false; // By default, only messages are passed further m_passEvent = ( aEvent.m_category == TC_MESSAGE ); // got matching event? clear wait list and wake up the coroutine st->wakeupEvent = aEvent; Loading
include/tool/tool_action.h +10 −0 Original line number Diff line number Diff line Loading @@ -148,6 +148,8 @@ public: { if( IsActivation() ) return TOOL_EVENT( TC_COMMAND, TA_ACTIVATE, m_name, m_scope ); else if( IsNotification() ) return TOOL_EVENT( TC_MESSAGE, TA_ANY, m_name, m_scope ); else return TOOL_EVENT( TC_COMMAND, TA_ACTION, m_name, m_scope ); } Loading Loading @@ -192,6 +194,14 @@ public: return m_flags & AF_ACTIVATE; } /** * Returns true if the action is a notification. */ bool IsNotification() const { return m_flags & AF_NOTIFY; } private: friend class ACTION_MANAGER; Loading
include/tool/tool_event.h +2 −1 Original line number Diff line number Diff line Loading @@ -130,7 +130,8 @@ enum TOOL_ACTION_SCOPE enum TOOL_ACTION_FLAGS { AF_NONE = 0, AF_ACTIVATE = 1 ///> Action activates a tool AF_ACTIVATE = 1, ///> Action activates a tool AF_NOTIFY = 2 ///> Action is a notification (it is by default passed to all tools) }; /// Defines when a context menu is opened. Loading
pcbnew/tools/common_actions.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -264,7 +264,7 @@ TOOL_ACTION COMMON_ACTIONS::viaSizeDec( "pcbnew.EditorControl.viaSizeDec", TOOL_ACTION COMMON_ACTIONS::trackViaSizeChanged( "pcbnew.EditorControl.trackViaSizeChanged", AS_GLOBAL, 0, "", "" ); "", "", AF_NOTIFY ); // Module editor tools Loading