Skip to content
Permalink
Browse files

[recent projects] do not insert path twice in the recent project file…

… menu
  • Loading branch information
nirvn committed Sep 4, 2015
1 parent 6a5d9da commit 4ab2fba7a5c7ccd00c865b71b430c8ad61abad0e
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 4ab2fba

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