Skip to content
Permalink
Browse files

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 438b6892419ff5854d0e9c55b922a15b5af27b15
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/app/qgisapp.cpp
@@ -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 );
}

0 comments on commit 438b689

Please sign in to comment.
You can’t perform that action at this time.