Render cell background in renderer only if rendering on propgrid canvas

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2008-11-23 11:30:24 +00:00
parent b0996c3da0
commit a2851207a6
2 changed files with 6 additions and 2 deletions

View File

@@ -691,6 +691,8 @@ void wxPropertyGrid::OnComboItemPaint( const wxPGComboBox* pCb,
if ( flags & wxODCB_PAINTING_CONTROL )
renderFlags |= wxPGCellRenderer::Control;
else
renderFlags |= wxPGCellRenderer::ChoicePopup;
if ( flags & wxODCB_PAINTING_SELECTED )
renderFlags |= wxPGCellRenderer::Selected;

View File

@@ -149,7 +149,9 @@ int wxPGCellRenderer::PreDrawCell( wxDC& dc, const wxRect& rect, const wxPGCell&
dc.SetTextForeground(cell.GetFgCol());
}
// Draw Background
// Draw Background, but only if not rendering in control
// (as control already has rendered correct background).
if ( !(flags & (Control|ChoicePopup)) )
dc.DrawRectangle(rect);
const wxBitmap& bmp = cell.GetBitmap();