ui: recent projects menu fix

recent projects updates now when a projects is loaded
This commit is contained in:
Andreas Stallinger
2015-11-17 12:13:48 +01:00
parent 42afbce300
commit 86f06c9f78
8 changed files with 47 additions and 27 deletions
+10 -1
View File
@@ -113,7 +113,16 @@ ApplicationSettings::ApplicationSettings()
std::vector<FilePath> ApplicationSettings::getRecentProjects() const
{
return getPathValues("user/recent_projects/recent_project");
std::vector<FilePath> recentProjects = getPathValues("user/recent_projects/recent_project");
std::vector<FilePath>::iterator iter = recentProjects.end();
for( ; iter != recentProjects.begin(); iter--)
{
if(!(*iter).exists())
{
recentProjects.erase(iter);
}
}
return recentProjects;
}
bool ApplicationSettings::setRecentProjects(const std::vector<FilePath> &recentProjects)