diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-03-16 15:48:43 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-03-16 19:09:02 +0100 |
commit | a7de363cead5cd0021d2e3df4573d4cbe27df23b (patch) | |
tree | f9e60ff583c1621bf6a5eee2a36eb22b41052708 /vcl/source/control/spinbtn.cxx | |
parent | 2f7f34bf9fb744a2615426e4414dff3ca6fbe6e4 (diff) |
remove unnecessary Window::Update() calls, which immediately follow Invalidate
Update() is effectively "paint immediately". Rather just let the
invalidate do it's thing and have the widget paint on the next paint
loop, along with the rest of the stuff.
This is probably mostly cargo-cult, from the days when our
invalidate/paint timer could take a long time to kick in.
Change-Id: Idff06526e9a2892244cfd8ce6947916032b0d1a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90567
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'vcl/source/control/spinbtn.cxx')
-rw-r--r-- | vcl/source/control/spinbtn.cxx | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/vcl/source/control/spinbtn.cxx b/vcl/source/control/spinbtn.cxx index 6c738b5056ad..645aba468a36 100644 --- a/vcl/source/control/spinbtn.cxx +++ b/vcl/source/control/spinbtn.cxx @@ -193,7 +193,6 @@ void SpinButton::MouseButtonDown( const MouseEvent& rMEvt ) if ( mbUpperIn || mbLowerIn ) { - Update(); CaptureMouse(); if ( mbRepeat ) maRepeatTimer.Start(); @@ -213,14 +212,12 @@ void SpinButton::MouseButtonUp( const MouseEvent& ) { mbUpperIn = false; Invalidate( maUpperRect ); - Update(); Up(); } else if ( mbLowerIn ) { mbLowerIn = false; Invalidate( maLowerRect ); - Update(); Down(); } @@ -238,7 +235,6 @@ void SpinButton::MouseMove( const MouseEvent& rMEvt ) mbUpperIn = false; maRepeatTimer.Stop(); Invalidate( maUpperRect ); - Update(); } else if ( !maLowerRect.IsInside( rMEvt.GetPosPixel() ) && mbLowerIn && mbInitialDown ) @@ -246,7 +242,6 @@ void SpinButton::MouseMove( const MouseEvent& rMEvt ) mbLowerIn = false; maRepeatTimer.Stop(); Invalidate( maLowerRect ); - Update(); } else if ( maUpperRect.IsInside( rMEvt.GetPosPixel() ) && !mbUpperIn && mbInitialUp ) @@ -255,7 +250,6 @@ void SpinButton::MouseMove( const MouseEvent& rMEvt ) if ( mbRepeat ) maRepeatTimer.Start(); Invalidate( maUpperRect ); - Update(); } else if ( maLowerRect.IsInside( rMEvt.GetPosPixel() ) && !mbLowerIn && mbInitialDown ) @@ -264,7 +258,6 @@ void SpinButton::MouseMove( const MouseEvent& rMEvt ) if ( mbRepeat ) maRepeatTimer.Start(); Invalidate( maLowerRect ); - Update(); } } |