Fixed bug in keybind UI
This commit is contained in:
@@ -859,7 +859,6 @@ void MainWindow::updateShortcuts()
|
|||||||
|
|
||||||
accID = FindAccelerator("fullscreen");
|
accID = FindAccelerator("fullscreen");
|
||||||
seq = QKeySequence::fromString(acc_keys[accID].seq);
|
seq = QKeySequence::fromString(acc_keys[accID].seq);
|
||||||
//printf("shortcut: %s\n", qPrintable(ui->actionFullscreen->shortcut().toString()));
|
|
||||||
ui->actionFullscreen->setShortcut(seq);
|
ui->actionFullscreen->setShortcut(seq);
|
||||||
|
|
||||||
accID = FindAccelerator("hard_reset");
|
accID = FindAccelerator("hard_reset");
|
||||||
|
|||||||
@@ -68,9 +68,6 @@ SettingsInput::SettingsInput(QWidget *parent)
|
|||||||
keyTable->setSelectionBehavior(QAbstractItemView::SelectRows);
|
keyTable->setSelectionBehavior(QAbstractItemView::SelectRows);
|
||||||
keyTable->setSelectionMode(QAbstractItemView::SingleSelection);
|
keyTable->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||||
keyTable->setShowGrid(true);
|
keyTable->setShowGrid(true);
|
||||||
keyTable->setStyleSheet("QTableWidget::item:hover { }");
|
|
||||||
keyTable->setFocusPolicy(Qt::NoFocus);
|
|
||||||
keyTable->setSelectionMode(QAbstractItemView::NoSelection);
|
|
||||||
|
|
||||||
// Make a working copy of acc_keys so we can check for dupes later without getting
|
// Make a working copy of acc_keys so we can check for dupes later without getting
|
||||||
// confused
|
// confused
|
||||||
@@ -224,7 +221,7 @@ SettingsInput::on_tableKeys_doubleClicked(int row, int col)
|
|||||||
|
|
||||||
// Find the correct accelerator key entry
|
// Find the correct accelerator key entry
|
||||||
int accKeyID = FindAccelerator(qPrintable(ui->tableKeys->item(row,2)->text()));
|
int accKeyID = FindAccelerator(qPrintable(ui->tableKeys->item(row,2)->text()));
|
||||||
if (!accKeyID) return; // this should never happen
|
if (accKeyID < 0) return; // this should never happen
|
||||||
|
|
||||||
// Make the change
|
// Make the change
|
||||||
cell->setText(keyseq.toString(QKeySequence::NativeText));
|
cell->setText(keyseq.toString(QKeySequence::NativeText));
|
||||||
@@ -254,7 +251,7 @@ SettingsInput::on_pushButtonClearBind_Clicked()
|
|||||||
cell->setText("");
|
cell->setText("");
|
||||||
// Find the correct accelerator key entry
|
// Find the correct accelerator key entry
|
||||||
int accKeyID = FindAccelerator(qPrintable(ui->tableKeys->item(cell->row(),2)->text()));
|
int accKeyID = FindAccelerator(qPrintable(ui->tableKeys->item(cell->row(),2)->text()));
|
||||||
if (!accKeyID) return; // this should never happen
|
if (accKeyID < 0) return; // this should never happen
|
||||||
|
|
||||||
// Make the change
|
// Make the change
|
||||||
cell->setText("");
|
cell->setText("");
|
||||||
|
|||||||
Reference in New Issue
Block a user