summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/source/window/status.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index aebec55ec630..f83a8665dea1 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -1169,6 +1169,9 @@ void StatusBar::SetItemText( sal_uInt16 nItemId, const OUString& rText )
std::unique_ptr<SalLayout> pSalLayout = ImplLayout(pItem->maText,0,-1);
long nWidth = GetTextWidth( pItem->maText,0,-1,nullptr,pSalLayout.get() ) + nFudge;
+ // Invalidate cache.
+ pItem->mxLayoutCache.reset();
+
if( (nWidth > pItem->mnWidth + STATUSBAR_OFFSET) ||
((nWidth < pItem->mnWidth) && (mnDX - STATUSBAR_OFFSET) < mnItemsWidth ))
{