ConfigManager: Don't add templates to "recent files" list

Fixes #1812.
This commit is contained in:
Raine M. Ekman
2015-06-11 10:19:48 +03:00
parent 2f969c1e1c
commit f896316de4

View File

@@ -196,13 +196,15 @@ void ConfigManager::setSF2Dir(const QString &sfd)
void ConfigManager::addRecentlyOpenedProject( const QString & _file )
{
m_recentlyOpenedProjects.removeAll( _file );
if( m_recentlyOpenedProjects.size() > 15 )
{
m_recentlyOpenedProjects.removeLast();
if( !_file.endsWith(".mpt", Qt::CaseInsensitive) ) {
m_recentlyOpenedProjects.removeAll( _file );
if( m_recentlyOpenedProjects.size() > 15 )
{
m_recentlyOpenedProjects.removeLast();
}
m_recentlyOpenedProjects.push_front( _file );
ConfigManager::inst()->saveConfigFile();
}
m_recentlyOpenedProjects.push_front( _file );
ConfigManager::inst()->saveConfigFile();
}