diff --git a/src/core/ConfigManager.cpp b/src/core/ConfigManager.cpp index 5cc2710ec..3024a0646 100644 --- a/src/core/ConfigManager.cpp +++ b/src/core/ConfigManager.cpp @@ -197,7 +197,7 @@ void ConfigManager::addRecentlyOpenedProject( const QString & _file ) if( !_file.endsWith( ".mpt", Qt::CaseInsensitive ) ) { m_recentlyOpenedProjects.removeAll( _file ); - if( m_recentlyOpenedProjects.size() > 15 ) + if( m_recentlyOpenedProjects.size() > 30 ) { m_recentlyOpenedProjects.removeLast(); } diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 1722cdffd..2dbdcb663 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -830,10 +830,23 @@ void MainWindow::updateRecentlyOpenedProjectsMenu() { m_recentlyOpenedProjectsMenu->clear(); QStringList rup = ConfigManager::inst()->recentlyOpenedProjects(); + +// The file history goes 30 deep but we only show the 15 +// most recent ones that we can open. + int shownInMenu = 0; for( QStringList::iterator it = rup.begin(); it != rup.end(); ++it ) { - m_recentlyOpenedProjectsMenu->addAction( - embed::getIconPixmap( "project_file" ), *it ); + QFileInfo recentFile( *it ); + if ( recentFile.exists() ) + { + m_recentlyOpenedProjectsMenu->addAction( + embed::getIconPixmap( "project_file" ), *it ); + shownInMenu++; + if( shownInMenu >= 15 ) + { + return; + } + } } }