Fixed a hot key conflict.

This commit is contained in:
Maciej Suminski 2014-07-24 13:09:16 +02:00
parent 13b0784cd5
commit 893618bf3f
2 changed files with 10 additions and 1 deletions

View File

@ -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 );
}

View File

@ -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",