diff --git a/src/SessionController.cpp b/src/SessionController.cpp index e271c2b61..424fdc371 100644 --- a/src/SessionController.cpp +++ b/src/SessionController.cpp @@ -127,8 +127,10 @@ void SessionController::snapshot() else title = process->format(_session->tabTitleFormat(Session::LocalTabTitle) ) ; - if ( !title.isEmpty() ) - _session->setTitle(title); + if ( !title.simplified().isEmpty() ) + setTitle(title); + else + setTitle(_session->title()); if ( snapshot != process ) { @@ -493,10 +495,10 @@ void SessionController::renameSession() bool ok = false; const QString& text = KInputDialog::getText( i18n("Rename Tab") , i18n("Enter new tab text:") , - _session->title() , + _session->tabTitleFormat(Session::LocalTabTitle) , &ok ); if ( ok ) - _session->setTitle(text); + _session->setTabTitleFormat(Session::LocalTabTitle,text); } void SessionController::saveSession() { diff --git a/src/SessionManager.cpp b/src/SessionManager.cpp index ca3231cf0..d3084d680 100644 --- a/src/SessionManager.cpp +++ b/src/SessionManager.cpp @@ -623,6 +623,9 @@ void SessionManager::applyProfile(Session* session, const Profile* info , bool m session->setType( _types.key((Profile*)info) ); // Basic session settings + if ( !modifiedPropertiesOnly || info->isPropertySet(Profile::Name) ) + session->setTitle(info->name()); + if ( !modifiedPropertiesOnly || info->isPropertySet(Profile::Command) ) session->setProgram(info->command());