mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:56:53 +08:00
[Hotkey] Display hotkey name plus device name in hotkey model, resize view if new key has been added or removed
This commit is contained in:
committed by
Mat Sutcliffe
parent
ef4640e66f
commit
2a34786039
@@ -43,17 +43,19 @@ namespace BlackGui
|
||||
|
||||
if (role == Qt::DisplayRole)
|
||||
{
|
||||
if (index.column() == 0)
|
||||
const int col = index.column();
|
||||
if (col == 0)
|
||||
{
|
||||
const CIdentifier identifier = m_actionHotkeys[index.row()].getApplicableMachine();
|
||||
return identifier.getMachineName();
|
||||
}
|
||||
if (index.column() == 1)
|
||||
if (col == 1)
|
||||
{
|
||||
CHotkeyCombination combination = m_actionHotkeys[index.row()].getCombination();
|
||||
return combination.toQString();
|
||||
const CHotkeyCombination combination = m_actionHotkeys[index.row()].getCombination();
|
||||
return combination.asStringWithDeviceNames();
|
||||
// return combination.toQString();
|
||||
}
|
||||
if (index.column() == 2)
|
||||
if (col == 2)
|
||||
{
|
||||
return m_actionHotkeys[index.row()].getAction();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user