Skip to content

Commit a44bfb2

Browse files
nirvnm-kuhn
authored andcommittedSep 10, 2015
[recent project] make use of baseName() in the file menu too
1 parent 0d5472e commit a44bfb2

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2764,15 +2764,7 @@ void QgisApp::updateRecentProjectPaths()
27642764

27652765
Q_FOREACH ( const QgsWelcomePageItemsModel::RecentProjectData& recentProject, mRecentProjects )
27662766
{
2767-
QAction* action;
2768-
if ( recentProject.title != recentProject.path )
2769-
{
2770-
action = mRecentProjectsMenu->addAction( QString( "%1 (%2)" ).arg( recentProject.title ).arg( recentProject.path ) );
2771-
}
2772-
else
2773-
{
2774-
action = mRecentProjectsMenu->addAction( QString( "%1" ).arg( recentProject.path ) );
2775-
}
2767+
QAction* action = mRecentProjectsMenu->addAction( QString( "%1 (%2)" ).arg( recentProject.title != recentProject.path ? recentProject.title : QFileInfo( recentProject.path ).baseName() ).arg( recentProject.path ) );
27762768
action->setEnabled( QFile::exists(( recentProject.path ) ) );
27772769
action->setData( recentProject.path );
27782770
}

0 commit comments

Comments
 (0)
Please sign in to comment.