mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 01:45:38 +08:00
Function for getKeyStrings() and replace without key (just adding)
This commit is contained in:
committed by
Mat Sutcliffe
parent
94b53cef6c
commit
21acef505c
@@ -42,8 +42,11 @@ namespace BlackMisc
|
||||
|
||||
void CHotkeyCombination::replaceKey(CKeyboardKey oldKey, CKeyboardKey newKey)
|
||||
{
|
||||
Q_ASSERT(!oldKey.isUnknown());
|
||||
m_keyboardKeys.remove(oldKey);
|
||||
if (oldKey.hasKey())
|
||||
{
|
||||
Q_ASSERT(!oldKey.isUnknown());
|
||||
m_keyboardKeys.remove(oldKey);
|
||||
}
|
||||
if (!newKey.isUnknown()) { m_keyboardKeys.push_back(newKey); }
|
||||
m_keyboardKeys.sortBy(&CKeyboardKey::getKey);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user