diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2016-07-18 13:21:14 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-07-27 06:47:03 +0000 |
commit | 9f4af777a832d8a0b9a21d793d421fa6228131e0 (patch) | |
tree | 9775913d9946896a81b1fe2f4763b060c9d413cc /vcl | |
parent | 9870f02b310567c1d50c8e11a49afea5fdc549a0 (diff) |
Don't Update() and Flush() status bar draws
From reading the code of vcl::Window::Update, this already calls
Invalidate and Flush in case of top-level widgets and also handles
child windows.
And there is no need to invalidate the progress bar text, if we
just update the progress value.
Change-Id: Ie296c6ffe5db5a927ad69104ce8ffe3d0d29034a
Reviewed-on: https://gerrit.libreoffice.org/27285
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/status.cxx | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index 97d59e33d1ec..4ab71217745f 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -1162,7 +1162,6 @@ void StatusBar::SetItemText( sal_uInt16 nItemId, const OUString& rText ) // re-draw item if StatusBar is visible and UpdateMode active if ( pItem->mbVisible && !mbFormat && ImplIsItemUpdate() ) { - Update(); Rectangle aRect = ImplGetItemRectPos(nPos); Invalidate(aRect); Flush(); @@ -1216,7 +1215,6 @@ void StatusBar::SetItemData( sal_uInt16 nItemId, void* pNewData ) if ( (pItem->mnBits & StatusBarItemBits::UserDraw) && pItem->mbVisible && !mbFormat && ImplIsItemUpdate() ) { - Update(); Rectangle aRect = ImplGetItemRectPos(nPos); Invalidate(aRect, InvalidateFlags::NoErase); Flush(); @@ -1247,7 +1245,6 @@ void StatusBar::RedrawItem(sal_uInt16 nItemId) if (pItem && (pItem->mnBits & StatusBarItemBits::UserDraw) && pItem->mbVisible && ImplIsItemUpdate()) { - Update(); Rectangle aRect = ImplGetItemRectPos(nPos); Invalidate(aRect); Flush(); @@ -1342,7 +1339,6 @@ void StatusBar::StartProgressMode( const OUString& rText ) if ( IsReallyVisible() ) { Invalidate(); - Update(); Flush(); } } @@ -1356,8 +1352,7 @@ void StatusBar::SetProgressValue( sal_uInt16 nNewPercent ) && IsReallyVisible() && (!mnPercent || (mnPercent != nNewPercent)) ) { - Update(); - Invalidate(); + Invalidate(maPrgsFrameRect, InvalidateFlags::NONE); Flush(); } mnPercent = nNewPercent; @@ -1373,7 +1368,6 @@ void StatusBar::EndProgressMode() if ( IsReallyVisible() ) { Invalidate(); - Update(); Flush(); } } @@ -1389,9 +1383,8 @@ void StatusBar::SetText(const OUString& rText) } else { - Update(); - Window::SetText(rText); Invalidate(); + Window::SetText(rText); Flush(); } } @@ -1401,7 +1394,6 @@ void StatusBar::SetText(const OUString& rText) if (IsReallyVisible()) { Invalidate(); - Update(); Flush(); } } |