]> git.saurik.com Git - wxWidgets.git/commit
wxMSW: Fix incorrect subitem rect calculation in wxListCtrl.
authorVáclav Slavík <vslavik@fastmail.fm>
Fri, 7 Sep 2012 09:51:10 +0000 (09:51 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Fri, 7 Sep 2012 09:51:10 +0000 (09:51 +0000)
commitc9a695b777bdf8878a8316266aac9f3be4e7dc35
tree3be6dae1ec3be3d3c113c663bafad5c90881619f
parentb7e3daf441bca9d88c0a3f7a55f40919973cbb4b
wxMSW: Fix incorrect subitem rect calculation in wxListCtrl.

HandleSubItemPrepaint() calls wxGetListCtrlSubItemRect() (a thin
replacement of ListView_GetSubItemRect) with subitem argument
corresponding to MSDN documentation: it should be 0 for the whole item
and 1-based for subitems.

Unfortunately, as pointed out in an explanatory comment for
wxGetListCtrlSubItemRect(), MSDN lies and the index actually is 0-based.

The bug causes wxListCtrl's content to be shifted by one column and
rendered with additional artifacts as soon as custom drawing is used,
e.g. when a custom font is used.

This bug was introduced in r55378; the code correctly accounted for this
before that. This change partially reverts that commit.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72427 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/msw/listctrl.cpp