Skip to content

Commit b9da806

Browse files
committed
Fixed setting default application at first start.
1 parent 2aae838 commit b9da806

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

gui/applicationlist.cpp

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,21 +80,20 @@ bool ApplicationList::LoadSettings()
8080
defapp = 0;
8181
}
8282
#endif
83-
}
84-
85-
if (names.size() > 0 && (names.size() == paths.size())) {
83+
} else if (names.size() == paths.size()) {
8684
for (int i = 0; i < names.size(); i++) {
8785
const Application app(names[i], paths[i], params[i]);
8886
AddApplication(app);
8987
}
90-
91-
if (defapp == -1)
92-
mDefaultApplicationIndex = 0;
93-
else if (defapp < names.size())
94-
mDefaultApplicationIndex = defapp;
95-
else
96-
mDefaultApplicationIndex = 0;
9788
}
89+
90+
if (defapp == -1)
91+
mDefaultApplicationIndex = 0;
92+
else if (defapp < names.size())
93+
mDefaultApplicationIndex = defapp;
94+
else
95+
mDefaultApplicationIndex = 0;
96+
9897
return succeeded;
9998
}
10099

0 commit comments

Comments
 (0)