GUI: Select the default application in app list.

This commit is contained in:
Kimmo Varis 2011-02-25 13:15:53 +02:00
parent 166e5248db
commit 74c85b6b70
1 changed files with 9 additions and 3 deletions

View File

@ -272,10 +272,16 @@ void SettingsDialog::PopulateApplicationList()
mUI.mListWidget->addItem(name);
}
// If list contains items select first item
if (mTempApplications->GetApplicationCount())
{
// Select default application, or if there is no default app then the
// first item.
if (defapp == -1)
mUI.mListWidget->setCurrentRow(0);
else
{
if (mTempApplications->GetApplicationCount() > defapp)
mUI.mListWidget->setCurrentRow(defapp);
else
mUI.mListWidget->setCurrentRow(0);
}
}