mirror of
https://github.com/LMMS/lmms.git
synced 2026-04-01 04:44:07 -04:00
Some fixes to recent files (#3621)
* Add a factory default data/projects/templates/default.mpt. Fixes #528 * On launch, if the last project was a template we create a new project (default.mpt) instead. * If there is a recovery file present and you discard it we create a new project as the project launched could be defective or, if .lmmsrc.xml wasn't written, an earlier project.
This commit is contained in:
@@ -876,8 +876,8 @@ 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.
|
||||
// The file history goes 50 deep but we only show the 15
|
||||
// most recent ones that we can open and omit .mpt files.
|
||||
int shownInMenu = 0;
|
||||
for( QStringList::iterator it = rup.begin(); it != rup.end(); ++it )
|
||||
{
|
||||
@@ -885,6 +885,11 @@ void MainWindow::updateRecentlyOpenedProjectsMenu()
|
||||
if ( recentFile.exists() &&
|
||||
*it != ConfigManager::inst()->recoveryFile() )
|
||||
{
|
||||
if( recentFile.suffix().toLower() == "mpt" )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
m_recentlyOpenedProjectsMenu->addAction(
|
||||
embed::getIconPixmap( "project_file" ), *it );
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
|
||||
Reference in New Issue
Block a user