mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +08:00
Add the missing handling when user selects a different machine
So far, the case that a user selects a different machine, was not handled yet. refs #881
This commit is contained in:
committed by
Mathew Sutcliffe
parent
3a2618fadb
commit
9749bb5d31
@@ -100,6 +100,7 @@ namespace BlackGui
|
||||
connect(m_inputManager, &BlackCore::CInputManager::combinationSelectionChanged, this, &CHotkeyDialog::ps_combinationSelectionChanged);
|
||||
connect(m_inputManager, &BlackCore::CInputManager::combinationSelectionFinished, this, &CHotkeyDialog::ps_combinationSelectionFinished);
|
||||
connect(ui->tv_Actions->selectionModel(), &QItemSelectionModel::selectionChanged, this, &CHotkeyDialog::ps_changeSelectedAction);
|
||||
connect(ui->cb_Identifier, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &CHotkeyDialog::changeApplicableMachine);
|
||||
|
||||
initStyleSheet();
|
||||
}
|
||||
@@ -169,6 +170,14 @@ namespace BlackGui
|
||||
m_actionHotkey.setAction(index.data(Models::CActionModel::ActionRole).toString());
|
||||
}
|
||||
|
||||
void CHotkeyDialog::changeApplicableMachine(int index)
|
||||
{
|
||||
Q_UNUSED(index);
|
||||
QVariant userData = ui->cb_Identifier->currentData(Qt::UserRole);
|
||||
Q_ASSERT(userData.canConvert<CIdentifier>());
|
||||
m_actionHotkey.setApplicableMachine(userData.value<CIdentifier>());
|
||||
}
|
||||
|
||||
void CHotkeyDialog::ps_accept()
|
||||
{
|
||||
if (m_actionHotkey.getApplicableMachine().getMachineName().isEmpty())
|
||||
|
||||
Reference in New Issue
Block a user