summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2021-01-16 17:56:06 +0000
committerAndras Timar <andras.timar@collabora.com>2021-01-18 15:53:17 +0100
commit077eb097fd0b0429286c2a61eef923c56ad9685e (patch)
tree067933fd021057e88cbf9c1b66eecff0dd510875 /sfx2
parent430454fb5d30aa2767d12b90afd8e45a19daa9a6 (diff)
sidebar: only invalidate when things change.
Change-Id: Icc9c5bcde224cc979b834585531b847f1c5f7d0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109454 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Ashod Nakashian <ash@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/sidebar/Deck.cxx7
-rw-r--r--sfx2/source/sidebar/TitleBar.cxx14
2 files changed, 15 insertions, 6 deletions
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)