[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sfx2/source
Michael Meeks (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jan 18 14:53:55 UTC 2021
sfx2/source/sidebar/Deck.cxx | 7 +++++--
sfx2/source/sidebar/TitleBar.cxx | 14 ++++++++++----
2 files changed, 15 insertions(+), 6 deletions(-)
New commits:
commit 077eb097fd0b0429286c2a61eef923c56ad9685e
Author: Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Sat Jan 16 17:56:06 2021 +0000
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Mon Jan 18 15:53:17 2021 +0100
sidebar: only invalidate when things change.
Change-Id: Icc9c5bcde224cc979b834585531b847f1c5f7d0b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109454
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Ashod Nakashian <ash at collabora.com>
diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx
index f25d5015fe8f..a2c092157008 100644
--- a/sfx2/source/sidebar/Deck.cxx
+++ b/sfx2/source/sidebar/Deck.cxx
@@ -444,8 +444,11 @@ void Deck::ScrollContainerWindow::Paint(vcl::RenderContext& rRenderContext, cons
void Deck::ScrollContainerWindow::SetSeparators (const ::std::vector<sal_Int32>& rSeparators)
{
- maSeparators = rSeparators;
- Invalidate();
+ if (rSeparators != maSeparators)
+ {
+ maSeparators = rSeparators;
+ Invalidate();
+ }
}
} } // end of namespace sfx2::sidebar
diff --git a/sfx2/source/sidebar/TitleBar.cxx b/sfx2/source/sidebar/TitleBar.cxx
index 8f45bb751c0c..d8e0aef1a48c 100644
--- a/sfx2/source/sidebar/TitleBar.cxx
+++ b/sfx2/source/sidebar/TitleBar.cxx
@@ -61,14 +61,20 @@ void TitleBar::dispose()
void TitleBar::SetTitle(const OUString& rsTitle)
{
- msTitle = rsTitle;
- Invalidate();
+ if (msTitle != rsTitle)
+ {
+ msTitle = rsTitle;
+ Invalidate();
+ }
}
void TitleBar::SetIcon(const Image& rIcon)
{
- maIcon = rIcon;
- Invalidate();
+ if (maIcon != rIcon)
+ {
+ maIcon = rIcon;
+ Invalidate();
+ }
}
void TitleBar::ApplySettings(vcl::RenderContext& rRenderContext)
More information about the Libreoffice-commits
mailing list