From 8e10731e37621e271eea481dd93065a55c0a74c8 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Wed, 1 Mar 2023 23:04:39 +0100 Subject: [PATCH] Settings: remove unnecessary selection code --- src/SettingsDialog.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/SettingsDialog.cpp b/src/SettingsDialog.cpp index 227ad3b..dcf6880 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) {