Added test for no-change in crollwin.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5785 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -519,8 +519,9 @@ void wxScrolledWindow::Scroll( int x_pos, int y_pos )
|
||||
m_xScrollPosition = wxMin( m_xScrollLines-noPagePositions, m_xScrollPosition );
|
||||
m_xScrollPosition = wxMax( 0, m_xScrollPosition );
|
||||
|
||||
m_targetWindow->SetScrollPos( wxHORIZONTAL, m_xScrollPosition, TRUE );
|
||||
if (old_x == m_xScrollPosition) return;
|
||||
|
||||
m_targetWindow->SetScrollPos( wxHORIZONTAL, m_xScrollPosition, TRUE );
|
||||
m_targetWindow->ScrollWindow( (old_x-m_xScrollPosition)*m_xScrollPixelsPerLine, 0 );
|
||||
}
|
||||
if (y_pos != -1)
|
||||
@@ -538,12 +539,12 @@ void wxScrolledWindow::Scroll( int x_pos, int y_pos )
|
||||
m_yScrollPosition = wxMin( m_yScrollLines-noPagePositions, m_yScrollPosition );
|
||||
m_yScrollPosition = wxMax( 0, m_yScrollPosition );
|
||||
|
||||
m_targetWindow->SetScrollPos( wxVERTICAL, m_yScrollPosition, TRUE );
|
||||
if (old_y == m_yScrollPosition) return;
|
||||
|
||||
m_targetWindow->SetScrollPos( wxVERTICAL, m_yScrollPosition, TRUE );
|
||||
m_targetWindow->ScrollWindow( 0, (old_y-m_yScrollPosition)*m_yScrollPixelsPerLine );
|
||||
}
|
||||
|
||||
|
||||
#ifdef __WXMAC__
|
||||
m_targetWindow->MacUpdateImmediately();
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user