From eff1c3e8ec093b83b61d04d543d8ff37792a31f2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Wed, 14 Dec 2011 15:53:28 +0000 Subject: [PATCH] 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 --- src/generic/datavgen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index ee37a90226..99763c1787 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -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(); -- 2.50.0