Contextual hotkeys can overlap for different tools
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8512
This commit is contained in:
parent
b7f32d7f53
commit
d856b01d32
|
@ -223,6 +223,15 @@ bool HOTKEY_STORE::CheckKeyConflicts( TOOL_ACTION* aAction, long aKey, HOTKEY**
|
||||||
|
|
||||||
if( hotkey.m_EditKeycode == aKey )
|
if( hotkey.m_EditKeycode == aKey )
|
||||||
{
|
{
|
||||||
|
// We can use the same key for a different action if both actions are contextual and
|
||||||
|
// for different tools.
|
||||||
|
if( hotkey.m_Actions[0]->GetScope() == AS_CONTEXT &&
|
||||||
|
aAction->GetScope() == AS_CONTEXT &&
|
||||||
|
hotkey.m_Actions[0]->GetToolName() != aAction->GetToolName() )
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
*aConflict = &hotkey;
|
*aConflict = &hotkey;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue