fixed scrollbar refresh

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10931 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-07-10 00:48:54 +00:00
parent fba82cc079
commit a85c155217

View File

@@ -384,12 +384,12 @@ void wxScrollHelper::HandleOnScroll(wxScrollWinEvent& event)
if (orient == wxHORIZONTAL) if (orient == wxHORIZONTAL)
{ {
m_xScrollPosition += nScrollInc; m_xScrollPosition += nScrollInc;
m_targetWindow->SetScrollPos(wxHORIZONTAL, m_xScrollPosition, FALSE); m_targetWindow->SetScrollPos(wxHORIZONTAL, m_xScrollPosition);
} }
else else
{ {
m_yScrollPosition += nScrollInc; m_yScrollPosition += nScrollInc;
m_targetWindow->SetScrollPos(wxVERTICAL, m_yScrollPosition, FALSE); m_targetWindow->SetScrollPos(wxVERTICAL, m_yScrollPosition);
} }
bool needsRefresh = FALSE; bool needsRefresh = FALSE;
@@ -677,7 +677,7 @@ void wxScrollHelper::Scroll( int x_pos, int y_pos )
m_xScrollPosition = wxMax( 0, m_xScrollPosition ); m_xScrollPosition = wxMax( 0, m_xScrollPosition );
if (old_x != m_xScrollPosition) { if (old_x != m_xScrollPosition) {
m_targetWindow->SetScrollPos( wxHORIZONTAL, m_xScrollPosition, FALSE ); m_targetWindow->SetScrollPos( wxHORIZONTAL, m_xScrollPosition );
m_targetWindow->ScrollWindow( (old_x-m_xScrollPosition)*m_xScrollPixelsPerLine, 0, m_targetWindow->ScrollWindow( (old_x-m_xScrollPosition)*m_xScrollPixelsPerLine, 0,
GetRect() ); GetRect() );
} }
@@ -698,7 +698,7 @@ void wxScrollHelper::Scroll( int x_pos, int y_pos )
m_yScrollPosition = wxMax( 0, m_yScrollPosition ); m_yScrollPosition = wxMax( 0, m_yScrollPosition );
if (old_y != m_yScrollPosition) { if (old_y != m_yScrollPosition) {
m_targetWindow->SetScrollPos( wxVERTICAL, m_yScrollPosition, FALSE ); m_targetWindow->SetScrollPos( wxVERTICAL, m_yScrollPosition );
m_targetWindow->ScrollWindow( 0, (old_y-m_yScrollPosition)*m_yScrollPixelsPerLine, m_targetWindow->ScrollWindow( 0, (old_y-m_yScrollPosition)*m_yScrollPixelsPerLine,
GetRect() ); GetRect() );
} }