diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2016-02-17 21:05:50 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2016-02-17 21:30:24 +0000 |
commit | c4c3aa5cd957067709e24037d7f40246039660fc (patch) | |
tree | 4f773e1ae36d52990308d4807e313da85c8402f0 | |
parent | 469ce3ed324c784a2af1e2fdb0a1f09e28170def (diff) |
tdf#97922 - Mend nonsensical spin invalidation to improve rendering.
Change-Id: I3a398c47c69cc292a681ebe2414d844c224f3e3e
-rw-r--r-- | include/vcl/toolbox.hxx | 3 | ||||
-rw-r--r-- | vcl/source/window/toolbox.cxx | 11 |
2 files changed, 7 insertions, 7 deletions
diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx index 12a0b7029f9b..11958cd1f7e0 100644 --- a/include/vcl/toolbox.hxx +++ b/include/vcl/toolbox.hxx @@ -155,7 +155,8 @@ public: using Window::ImplInit; private: SAL_DLLPRIVATE void InvalidateItem(sal_uInt16 nPosition); - SAL_DLLPRIVATE void InvalidateSpin(bool bUpperIn, bool bLowerIn); + SAL_DLLPRIVATE void InvalidateSpin(bool bInvalidateUpper = true, + bool bInvalidateLower = true); SAL_DLLPRIVATE void InvalidateMenuButton(); SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle ); diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index b147b0e1ff0c..9c1e93b06778 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -3457,8 +3457,7 @@ bool ToolBox::ImplHandleMouseMove( const MouseEvent& rMEvt, bool bRepeat ) if ( bNewIn != mbIn ) { mbIn = bNewIn; - Invalidate(); - InvalidateSpin(mbIn, false); + InvalidateSpin(true, false); } return true; } @@ -3469,7 +3468,7 @@ bool ToolBox::ImplHandleMouseMove( const MouseEvent& rMEvt, bool bRepeat ) if ( bNewIn != mbIn ) { mbIn = bNewIn; - InvalidateSpin(false, mbIn); + InvalidateSpin(false, true); } return true; } @@ -4482,7 +4481,7 @@ void ToolBox::Command( const CommandEvent& rCEvt ) ShowLine( false ); else if ( (mnCurLine+mnVisLines-1 < mnCurLines) && (pData->GetDelta() < 0) ) ShowLine( true ); - InvalidateSpin(false, false); + InvalidateSpin(); return; } } @@ -5188,7 +5187,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) mnCurLine = 1; mbFormat = true; ImplFormat(); - InvalidateSpin(false, false); + InvalidateSpin(); ImplChangeHighlight( ImplGetFirstValidItem( mnCurLine ) ); } break; @@ -5201,7 +5200,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) mnCurLine = mnCurLines; mbFormat = true; ImplFormat(); - InvalidateSpin(false, false); + InvalidateSpin(); ImplChangeHighlight( ImplGetFirstValidItem( mnCurLine ) ); } break; |