Skip to content
Permalink
Browse files

Select an action initially in the shortcuts page

This prevents confusion or bugs over what is being changed when
no element is initially selected
  • Loading branch information...
scribblemaniac committed Apr 15, 2019
1 parent 676092a commit ca3b6519a6ff2ecfa15786e58d7e69cce2743dd3
Showing with 3 additions and 0 deletions.
  1. +3 −0 app/src/shortcutspage.cpp
@@ -47,6 +47,9 @@ ShortcutsPage::ShortcutsPage( QWidget* parent )
connect( ui->keySequenceEdit, &QKeySequenceEdit::editingFinished, this, &ShortcutsPage::keyCapLineEditTextChanged );
connect( ui->restoreShortcutsButton, &QPushButton::clicked, this, &ShortcutsPage::restoreShortcutsButtonClicked );
connect( ui->clearButton, &QPushButton::clicked, this, &ShortcutsPage::clearButtonClicked );

ui->treeView->selectionModel()->select(QItemSelection(m_treeModel->index(0, 0), m_treeModel->index(0, m_treeModel->columnCount() - 1)), QItemSelectionModel::Select);
tableItemClicked(m_treeModel->index(0, 0));
}

void ShortcutsPage::tableItemClicked( const QModelIndex& modelIndex )

0 comments on commit ca3b651

Please sign in to comment.
You can’t perform that action at this time.