From: Vadim Zeitlin Date: Sat, 30 Oct 2010 19:01:10 +0000 (+0000) Subject: Fix order of arguments in wxOSX/Carbon wxListCtrl::ScrollList(). X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c9c4274adc464db0c3de728c906fa1f27c6a3dd8 Fix order of arguments in wxOSX/Carbon wxListCtrl::ScrollList(). wxMacDataBrowserTableViewControl::SetScrollPosition() takes "top" and "left" arguments so swap "dx" and "dy" parameters being passed to it. It might be better to fix SetScrollPosition() to follow the more natural (at least from wx point of view) convention and as it's used in only a few places this wouldn't be difficult to do. But let's keep the changes to this code to the minimum for now. Closes #12339. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/osx/carbon/listctrl_mac.cpp b/src/osx/carbon/listctrl_mac.cpp index b9161b086e..8e3ac789f6 100644 --- a/src/osx/carbon/listctrl_mac.cpp +++ b/src/osx/carbon/listctrl_mac.cpp @@ -2319,7 +2319,9 @@ bool wxListCtrl::ScrollList(int dx, int dy) if (m_dbImpl) { - m_dbImpl->SetScrollPosition(dx, dy); + // Notice that the parameter order is correct here: first argument is + // the "top" displacement, second one is the "left" one. + m_dbImpl->SetScrollPosition(dy, dx); } return true; }