From: tobtoht Date: Wed, 1 Mar 2023 22:04:39 +0000 (+0100) Subject: Settings: remove unnecessary selection code X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=8e10731e37621e271eea481dd93065a55c0a74c8;p=gamesguru%2Ffeather.git Settings: remove unnecessary selection code --- diff --git a/src/SettingsDialog.cpp b/src/SettingsDialog.cpp index 227ad3b5..dcf68803 100644 --- a/src/SettingsDialog.cpp +++ b/src/SettingsDialog.cpp @@ -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) {