Fixed bug in keybind UI

This commit is contained in:
=
2025-04-19 20:11:17 -07:00
parent 34620f3246
commit 6ae813f8ab
2 changed files with 2 additions and 6 deletions

View File

@@ -859,7 +859,6 @@ void MainWindow::updateShortcuts()
accID = FindAccelerator("fullscreen");
seq = QKeySequence::fromString(acc_keys[accID].seq);
//printf("shortcut: %s\n", qPrintable(ui->actionFullscreen->shortcut().toString()));
ui->actionFullscreen->setShortcut(seq);
accID = FindAccelerator("hard_reset");

View File

@@ -68,9 +68,6 @@ SettingsInput::SettingsInput(QWidget *parent)
keyTable->setSelectionBehavior(QAbstractItemView::SelectRows);
keyTable->setSelectionMode(QAbstractItemView::SingleSelection);
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
// confused
@@ -224,7 +221,7 @@ SettingsInput::on_tableKeys_doubleClicked(int row, int col)
// Find the correct accelerator key entry
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
cell->setText(keyseq.toString(QKeySequence::NativeText));
@@ -254,7 +251,7 @@ SettingsInput::on_pushButtonClearBind_Clicked()
cell->setText("");
// Find the correct accelerator key entry
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
cell->setText("");