GUI: Fix for initializing default application.

This commit is contained in:
Kimmo Varis 2011-02-25 18:01:23 +02:00
parent c283bc414d
commit ece896a13d
1 changed files with 7 additions and 4 deletions

View File

@ -63,7 +63,6 @@ void ApplicationList::LoadSettings(QSettings *programSettings)
defapp = 0;
break;
}
// use as default for windows environments
if (FindDefaultWindowsEditor())
{
defapp = 0;
@ -76,10 +75,14 @@ void ApplicationList::LoadSettings(QSettings *programSettings)
if (names.size() > 0 && (names.size() == paths.size()))
{
for (int i = 0; i < names.size(); i++)
{
AddApplication(names[i], paths[i]);
}
mDefaultApplicationIndex = 1;
if (defapp == -1)
mDefaultApplicationIndex = 0;
else if (defapp < names.size())
mDefaultApplicationIndex = defapp;
else
mDefaultApplicationIndex = 0;
}
}