Fix drawing of items with custom background in wxGenericListCtrl.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 14 Sep 2010 13:18:48 +0000 (13:18 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 14 Sep 2010 13:18:48 +0000 (13:18 +0000)
commited84dc74d9bd041c9c446cb87e598c2c4df0fa2f
tree5710639e1fb1876c5330ffc70883f89a0f75982f
parent4be95bef8c96a20b0cfe04616b37867d3c8e6e50
Fix drawing of items with custom background in wxGenericListCtrl.

This was broken by the changes of r64879 which erroneously used
wxRendererNative::DrawItemSelectionRect() even for the non-selected items.

Now only use DrawItemSelectionRect() for the selected items to make them
appear natively while drawing the non-selected items with custom background
colour ourselves.

Also refactor the code to avoid (the not quite and hence especially
pernicious) duplication between wxListLineData::Draw() and DrawInReportMode():
rename SetAttributes() to ApplyAttributes() and draw the item background in
this function now instead of doing it in both Draw() and DrawInReportMode().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65541 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/generic/private/listctrl.h
src/generic/listctrl.cpp