Don't change horizontal scroll position needlessly in wxDataViewCtrl.

When ScrollTo() or EnsureVisible() was called in the generic
wxDataViewCtrl implementation with unspecified column, horizontal scroll
position was reset to left-most position, which doesn't make much sense.
Instead, leave horizontal position unchanged in this case and only
change it when explicitly requested.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2011-12-14 15:53:28 +00:00
parent 78e18e8d53
commit eff1c3e8ec

View File

@@ -2433,7 +2433,7 @@ void wxDataViewMainWindow::ScrollTo( int rows, int column )
int x, y;
m_owner->GetScrollPixelsPerUnit( &x, &y );
int sy = GetLineStart( rows )/y;
int sx = 0;
int sx = -1;
if( column != -1 )
{
wxRect rect = GetClientRect();