wxScrolledWindow::Scroll() no longer calls Refresh(). Adjusted listctrl to

this change.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2389 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Karsten Ballüder 1999-05-10 11:07:54 +00:00
parent 0abb488549
commit aab3e197ce
2 changed files with 6 additions and 5 deletions

View File

@ -1356,15 +1356,15 @@ void wxListMainWindow::MoveToFocus( void )
{
int y_s = m_yScroll*GetScrollPos( wxVERTICAL );
if ((y > y_s) && (y+h < y_s+h_p)) return;
if (y-y_s < 5) Scroll( -1, (y-5-h_p/2)/m_yScroll );
if (y+h+5 > y_s+h_p) Scroll( -1, (y+h-h_p/2+h+15)/m_yScroll );
if (y-y_s < 5) { Scroll( -1, (y-5-h_p/2)/m_yScroll ); Refresh(); }
if (y+h+5 > y_s+h_p) { Scroll( -1, (y+h-h_p/2+h+15)/m_yScroll); Refresh(); }
}
else
{
int x_s = m_xScroll*GetScrollPos( wxHORIZONTAL );
if ((x > x_s) && (x+w < x_s+w_p)) return;
if (x-x_s < 5) Scroll( (x-5)/m_xScroll, -1 );
if (x+w-5 > x_s+w_p) Scroll( (x+w-w_p+15)/m_xScroll, -1 );
if (x-x_s < 5) { Scroll( (x-5)/m_xScroll, -1 ); Refresh(); }
if (x+w-5 > x_s+w_p) { Scroll( (x+w-w_p+15)/m_xScroll, -1 ); Refresh(); }
}
}

View File

@ -456,7 +456,8 @@ void wxScrolledWindow::Scroll( int x_pos, int y_pos )
SetScrollPos( wxVERTICAL, m_yScrollPosition, TRUE );
}
Refresh();
// BAD, BAD, can cause event loops if called from OnPaint(). (KB)
// Refresh();
#ifdef __WXMSW__
// Necessary?