Skip to content

Commit 438b689

Browse files
committedSep 4, 2015
Merge pull request #2289 from nirvn/fix_menu_recent_project
[recent projects] do not insert path twice in the recent project file menu
2 parents 6a5d9da + 4ab2fba commit 438b689

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2755,7 +2755,15 @@ void QgisApp::updateRecentProjectPaths()
27552755

27562756
Q_FOREACH ( const QgsWelcomePageItemsModel::RecentProjectData& recentProject, mRecentProjects )
27572757
{
2758-
QAction* action = mRecentProjectsMenu->addAction( QString( "%1 (%2)" ).arg( recentProject.title ).arg( recentProject.path ) );
2758+
QAction* action;
2759+
if ( recentProject.title != recentProject.path )
2760+
{
2761+
action = mRecentProjectsMenu->addAction( QString( "%1 (%2)" ).arg( recentProject.title ).arg( recentProject.path ) );
2762+
}
2763+
else
2764+
{
2765+
action = mRecentProjectsMenu->addAction( QString( "%1" ).arg( recentProject.path ) );
2766+
}
27592767
action->setEnabled( QFile::exists(( recentProject.path ) ) );
27602768
action->setData( recentProject.path );
27612769
}

0 commit comments

Comments
 (0)
Please sign in to comment.