sfx2/source/doc/objmisc.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
New commits: commit cd45b2a2fcb97d60281b900a5cfd0eea6e17ac68 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Tue Jan 28 14:59:18 2025 +0000 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Fri Feb 7 09:37:56 2025 +0100 Don't broadcast SfxHintId::TitleChanged if title doesn't change Change-Id: Id3a0adb8903f269a94fdfb63220305780b96db4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180852 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index 0c880d7914fb..ac6c9e343455 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -866,9 +866,14 @@ void SfxObjectShell::InvalidateName() { pImpl->aTitle.clear(); - SetName( GetTitle( SFX_TITLE_APINAME ) ); - Broadcast( SfxHint(SfxHintId::TitleChanged) ); + OUString sOldName = GetName(); + OUString sNewName = GetTitle(SFX_TITLE_APINAME); + if (sOldName != sNewName) + { + SetName(sNewName); + Broadcast(SfxHint(SfxHintId::TitleChanged)); + } }