Theme Editor: Recent documents/projects that no longer exist are now cleared from the menu
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27611 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
5106d938c6
commit
89c1a88dc8
1 changed files with 11 additions and 1 deletions
|
@ -110,7 +110,7 @@ void EditorWindow::loadConfigTab(ConfigDocument* doc)
|
|||
this, SLOT(tabTitleChanged(QString)));
|
||||
}
|
||||
|
||||
void EditorWindow::loadSettings()
|
||||
void EditorWindow::loadSettings()
|
||||
{
|
||||
|
||||
QSettings settings;
|
||||
|
@ -918,6 +918,16 @@ void EditorWindow::projectToTop(QString file)
|
|||
|
||||
void EditorWindow::refreshRecentMenus()
|
||||
{
|
||||
/* Clearing any deleted documents */
|
||||
for(int i = 0; i < recentDocs.count(); i++)
|
||||
if(!QFile::exists(recentDocs[i]))
|
||||
recentDocs.removeAt(i--);
|
||||
|
||||
/* Clearing any deleted projects */
|
||||
for(int i = 0; i < recentProjects.count(); i++)
|
||||
if(!QFile::exists(recentProjects[i]))
|
||||
recentProjects.removeAt(i--);
|
||||
|
||||
/* First hiding all the menu items */
|
||||
for(int i = 0; i < recentDocsMenu.count(); i++)
|
||||
recentDocsMenu[i]->setVisible(false);
|
||||
|
|
Loading…
Reference in a new issue