From f146ce1aae7ea92de6cfe6996e7bae88dfeafefb Mon Sep 17 00:00:00 2001 From: Kimmo Varis Date: Mon, 8 Jun 2009 16:58:26 +0300 Subject: [PATCH] GUI: If application list contains applications select the first by default. --- gui/settingsdialog.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gui/settingsdialog.cpp b/gui/settingsdialog.cpp index c7abd7b1d..b47a9e9b7 100644 --- a/gui/settingsdialog.cpp +++ b/gui/settingsdialog.cpp @@ -271,10 +271,16 @@ void SettingsDialog::DefaultApplication() void SettingsDialog::PopulateListWidget() { - for (int i = 0;i < mTempApplications.GetApplicationCount();i++) + for (int i = 0; i < mTempApplications.GetApplicationCount(); i++) { mListWidget->addItem(mTempApplications.GetApplicationName(i)); } + + // If list contains items select first item + if (mTempApplications.GetApplicationCount()) + { + mListWidget->setCurrentRow(0); + } } void SettingsDialog::Ok()