1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-03 06:24:48 -04:00

Commands: corrected edit command dialog focus handling to capture associated key

This commit is contained in:
f4exb
2018-01-06 05:51:14 +01:00
parent 8a032d0532
commit b002596677
3 changed files with 51 additions and 18 deletions
+4 -4
View File
@@ -153,8 +153,8 @@ void EditCommandDialog::on_keyCapture_toggled(bool checked)
{
if (checked)
{
ui->keyCapture->setFocus();
ui->keyCapture->setFocusPolicy(Qt::StrongFocus);
setFocus();
setFocusPolicy(Qt::StrongFocus);
connect(m_commandKeyReceiver, SIGNAL(capturedKey(Qt::Key, Qt::KeyboardModifiers, bool)),
this, SLOT(commandKeyPressed(Qt::Key, Qt::KeyboardModifiers, bool)));
}
@@ -162,8 +162,8 @@ void EditCommandDialog::on_keyCapture_toggled(bool checked)
{
disconnect(m_commandKeyReceiver, SIGNAL(capturedKey(Qt::Key, Qt::KeyboardModifiers, bool)),
this, SLOT(commandKeyPressed(Qt::Key, Qt::KeyboardModifiers, bool)));
ui->keyCapture->setFocusPolicy(Qt::NoFocus);
ui->keyCapture->clearFocus();
setFocusPolicy(Qt::NoFocus);
clearFocus();
}
}