Commit 2c8384a3 authored by luyikei's avatar luyikei

RecentProjects: Fix the recent projects menu not being created when a project is not loaded

parent 702f23c0
...@@ -32,6 +32,7 @@ RecentProjects::RecentProjects( Settings* vlmcSettings, QObject *parent ) ...@@ -32,6 +32,7 @@ RecentProjects::RecentProjects( Settings* vlmcSettings, QObject *parent )
{ {
m_recentsProjects = vlmcSettings->createVar( SettingValue::List, "private/RecentsProjects", QVariantList(), m_recentsProjects = vlmcSettings->createVar( SettingValue::List, "private/RecentsProjects", QVariantList(),
"", "", SettingValue::Private ); "", "", SettingValue::Private );
connect( m_recentsProjects, &SettingValue::changed, this, &RecentProjects::updated );
} }
QString QString
...@@ -62,7 +63,6 @@ RecentProjects::remove( const QString &projectFile ) ...@@ -62,7 +63,6 @@ RecentProjects::remove( const QString &projectFile )
} }
} }
m_recentsProjects->set( l ); m_recentsProjects->set( l );
emit updated();
} }
void void
...@@ -76,5 +76,4 @@ RecentProjects::projectLoaded( const QString& projectName, const QString& projec ...@@ -76,5 +76,4 @@ RecentProjects::projectLoaded( const QString& projectName, const QString& projec
l.removeAll( var ); l.removeAll( var );
l.insert( 0, var ); l.insert( 0, var );
m_recentsProjects->set( l ); m_recentsProjects->set( l );
emit updated();
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment