drastically reduced scrollbar flicker when thumb is being dragged

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxUNIVERSAL@8507 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-10-09 23:25:27 +00:00
parent a978bcef22
commit 5abcba0bef

View File

@@ -129,7 +129,8 @@ wxScrollBar::~wxScrollBar()
void wxScrollBar::DoSetThumb(int pos)
{
// don't do checks here, we're a private function
// don't assert hecks here, we're a private function which is meant to be
// called with any args at all
if ( pos < 0 )
{
pos = 0;
@@ -139,6 +140,12 @@ void wxScrollBar::DoSetThumb(int pos)
pos = m_range - m_thumbSize;
}
if ( m_thumbPos == pos )
{
// nothing changed, avoid refreshes which would provoke flicker
return;
}
if ( m_thumbPosOld == -1 )
{
// remember the old thumb position