Settings: remove unnecessary selection code

This commit is contained in:
tobtoht 2023-03-01 23:04:39 +01:00
parent 1dc8705c65
commit 8e10731e37
No known key found for this signature in database
GPG key ID: E45B10DD027D2472

View file

@ -372,11 +372,7 @@ void Settings::setupThemeComboBox() {
}
void Settings::setSelection(int index) {
// You'd really think there is a better way
QListWidgetItem *item = ui->selector->item(index);
QModelIndex idx = ui->selector->indexFromItem(item);
ui->selector->setCurrentRow(index);
ui->selector->selectionModel()->select(idx, QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);
}
void Settings::enableWebsocket(bool enabled) {