Skip to content

Commit

Permalink
Do not display the profile in the title bar if it is the current defa…
Browse files Browse the repository at this point in the history
…ult one
  • Loading branch information
YoannQDQ authored and nyalldawson committed Apr 24, 2023
1 parent 583eeee commit 78b76d9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app/qgisapp.cpp
Expand Up @@ -594,11 +594,12 @@ static void setTitleBarText_( QWidget &qgisApp )
caption += QStringLiteral( " %1" ).arg( Qgis::devVersion() );
}

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

qgisApp.setWindowTitle( caption );
Expand Down

0 comments on commit 78b76d9

Please sign in to comment.