Make sure to not repeat the update channels list when loading the settings for a...
authorCamila Ayres <hello@camilasan.com>
Tue, 6 Aug 2024 10:37:43 +0000 (12:37 +0200)
committerMatthieu Gallien <matthieu_gallien@yahoo.fr>
Tue, 6 Aug 2024 16:34:45 +0000 (18:34 +0200)
When adding a new account, the combo box would list each update channels twice.

Signed-off-by: Camila Ayres <hello@camilasan.com>
src/gui/generalsettings.cpp

index 2b91b4bc89ac2710640c489d4e1c1a553a973f79..7f8d705b71a7ef47807d9b3c1e24e1534f4bd2c1 100644 (file)
@@ -282,6 +282,7 @@ void GeneralSettings::loadMiscSettings()
 
 #if defined(BUILD_UPDATER)
     const auto validUpdateChannels = cfgFile.validUpdateChannels();
+    _ui->updateChannel->clear();
     _ui->updateChannel->addItems(validUpdateChannels);
     const auto currentUpdateChannelIndex = validUpdateChannels.indexOf(cfgFile.currentUpdateChannel());
     _ui->updateChannel->setCurrentIndex(currentUpdateChannelIndex != -1? currentUpdateChannelIndex : 0);