Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #2289 from nirvn/fix_menu_recent_project
[recent projects] do not insert path twice in the recent project file menu
  • Loading branch information
NathanW2 committed Sep 4, 2015
2 parents 6a5d9da + 4ab2fba commit 438b689
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -2755,7 +2755,15 @@ void QgisApp::updateRecentProjectPaths()

Q_FOREACH ( const QgsWelcomePageItemsModel::RecentProjectData& recentProject, mRecentProjects )
{
QAction* action = mRecentProjectsMenu->addAction( QString( "%1 (%2)" ).arg( recentProject.title ).arg( recentProject.path ) );
QAction* action;
if ( recentProject.title != recentProject.path )
{
action = mRecentProjectsMenu->addAction( QString( "%1 (%2)" ).arg( recentProject.title ).arg( recentProject.path ) );
}
else
{
action = mRecentProjectsMenu->addAction( QString( "%1" ).arg( recentProject.path ) );
}
action->setEnabled( QFile::exists(( recentProject.path ) ) );
action->setData( recentProject.path );
}
Expand Down

0 comments on commit 438b689

Please sign in to comment.