Skip to content

Commit

Permalink
[recent projects] do not insert path twice in the recent project file…
Browse files Browse the repository at this point in the history
… menu
  • Loading branch information
nirvn committed Sep 4, 2015
1 parent 6a5d9da commit 4ab2fba
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 4ab2fba

Please sign in to comment.