diff --git a/common/tool/action_manager.cpp b/common/tool/action_manager.cpp index a64ab9e1d5..91d5c4d7df 100644 --- a/common/tool/action_manager.cpp +++ b/common/tool/action_manager.cpp @@ -58,6 +58,15 @@ void ACTION_MANAGER::RegisterAction( TOOL_ACTION* aAction ) m_actionNameIndex[aAction->m_name] = aAction; m_actionIdIndex[aAction->m_id] = aAction; +#ifndef NDEBUG + // Check if there are two global actions assigned to the same hotkey + if( aAction->GetScope() == AS_GLOBAL ) + { + BOOST_FOREACH( const TOOL_ACTION* action, m_actionHotKeys[aAction->m_currentHotKey] ) + assert( action->GetScope() != AS_GLOBAL ); + } +#endif /* not NDEBUG */ + if( aAction->HasHotKey() ) m_actionHotKeys[aAction->m_currentHotKey].push_back( aAction ); } diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 5bb01cfdf5..a239d27aa2 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -314,7 +314,7 @@ TOOL_ACTION COMMON_ACTIONS::moduleTextOutlines( "pcbnew.ModuleEditor.textOutline // Miscellaneous TOOL_ACTION COMMON_ACTIONS::selectionTool( "pcbnew.Control.selectionTool", - AS_GLOBAL, ' ', + AS_GLOBAL, 0, "", "", AF_ACTIVATE ); TOOL_ACTION COMMON_ACTIONS::resetCoords( "pcbnew.Control.resetCoords",