]> git.saurik.com Git - wxWidgets.git/commit
Fix wxGrid editors background painting.
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 17 Oct 2012 16:44:02 +0000 (16:44 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 17 Oct 2012 16:44:02 +0000 (16:44 +0000)
commitccc040255c07064f2ed96f1a345d21860b202cb6
tree7d9947c0bce94c7f04217cb8a766c2ea5f0e244e
parent8ab75332894d55b557102c5a287727ca635cb1ff
Fix wxGrid editors background painting.

There were two fundamental problems: first, we painted on a separately created
wxClientDC instead of using the wxPaintDC already available in wxGrid. Second,
we invalidated the control while painting, resulting in endless repainting, at
least under wxGTK.

Fix the first problem by passing wxDC to wxGridCellEditor::PaintBackground()
and the second one by not refreshing the control from there as it just seems
unnecessary.

Also pass the attribute by reference for consistency with
wxGridCellRenderer::Draw() and because this pointer can never be NULL.

Closes #2628.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72697 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/generic/grid.h
include/wx/generic/grideditors.h
samples/grid/griddemo.cpp
src/generic/grid.cpp
src/generic/grideditors.cpp