FIX: [STUDIO-1510] recent project order in app config

Change-Id: I3040b693c324d4142127770a6e5bce81279cd136
This commit is contained in:
chunmao.guo 2022-12-01 09:19:41 +08:00 committed by Lane.Wei
parent 7a5cd8ddd7
commit a481e91105
1 changed files with 3 additions and 1 deletions

View File

@ -948,7 +948,9 @@ void AppConfig::set_recent_projects(const std::vector<std::string>& recent_proje
it->second.clear();
for (unsigned int i = 0; i < (unsigned int)recent_projects.size(); ++i)
{
it->second[std::to_string(i + 1)] = recent_projects[i];
auto n = std::to_string(i + 1);
if (n.length() == 1) n = "0" + n;
it->second[n] = recent_projects[i];
}
}