Skip to content

Commit

Permalink
Display profile name in window title as long as it is not the only one
Browse files Browse the repository at this point in the history
  • Loading branch information
YoannQDQ authored and nyalldawson committed Apr 24, 2023
1 parent 63ea221 commit ca6fa95
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/app/qgisapp.cpp
Expand Up @@ -594,12 +594,11 @@ static void setTitleBarText_( QWidget &qgisApp )
caption += QStringLiteral( " %1" ).arg( Qgis::devVersion() );
}

// Add current profile (if it's not the only one)
if ( QgisApp::instance()->userProfileManager()->allProfiles().count() > 1 )
{
// add current profile (if it's not the default one)
QgsUserProfile *profile = QgisApp::instance()->userProfileManager()->userProfile();
if ( profile->name() != QLatin1String( "default" ) )
caption += QStringLiteral( " [%1]" ).arg( profile->name() );
caption += QStringLiteral( " [%1]" ).arg( profile->name() );
}

qgisApp.setWindowTitle( caption );
Expand Down

0 comments on commit ca6fa95

Please sign in to comment.