Move duplicate hotkey check so it respects AS_CONTEXT.
This commit is contained in:
parent
2d28ab7dd2
commit
9adf012c20
|
@ -205,6 +205,11 @@ void ACTION_MANAGER::UpdateHotKeys()
|
||||||
// Second hotkey takes priority as defaults are loaded first and updates
|
// Second hotkey takes priority as defaults are loaded first and updates
|
||||||
// are loaded after
|
// are loaded after
|
||||||
if( action->GetScope() == AS_GLOBAL && m_actionHotKeys.count( hotkey ) )
|
if( action->GetScope() == AS_GLOBAL && m_actionHotKeys.count( hotkey ) )
|
||||||
|
{
|
||||||
|
for( auto it = m_actionHotKeys[hotkey].begin();
|
||||||
|
it != m_actionHotKeys[hotkey].end(); )
|
||||||
|
{
|
||||||
|
if( (*it)->GetScope() == AS_GLOBAL )
|
||||||
{
|
{
|
||||||
// Users are free to define colliding hotkeys, but we want to know if
|
// Users are free to define colliding hotkeys, but we want to know if
|
||||||
// our default set has any collisions.
|
// our default set has any collisions.
|
||||||
|
@ -213,11 +218,8 @@ void ACTION_MANAGER::UpdateHotKeys()
|
||||||
actionName.first,
|
actionName.first,
|
||||||
m_actionHotKeys[hotkey].front()->GetName() ) );
|
m_actionHotKeys[hotkey].front()->GetName() ) );
|
||||||
|
|
||||||
for( auto it = m_actionHotKeys[hotkey].begin();
|
|
||||||
it != m_actionHotKeys[hotkey].end(); )
|
|
||||||
{
|
|
||||||
if( (*it)->GetScope() == AS_GLOBAL )
|
|
||||||
it = m_actionHotKeys[hotkey].erase( it );
|
it = m_actionHotKeys[hotkey].erase( it );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
it++;
|
it++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue