Remove unnecessary check whether x-coordinate >= 0
Several lines before there is a block terminating the function if rect.x < 0 (measure item call) so there is no need to check after this block whether rect.x >= 0.
This commit is contained in:
@@ -824,8 +824,6 @@ void wxPropertyGrid::OnComboItemPaint( const wxPGComboBox* pCb,
|
||||
wxDC& dc = *pDc;
|
||||
dc.SetBrush(*wxWHITE_BRUSH);
|
||||
|
||||
if ( rect.x >= 0 )
|
||||
{
|
||||
//
|
||||
// DrawItem call
|
||||
wxPGCellRenderer* renderer = NULL;
|
||||
@@ -951,16 +949,6 @@ void wxPropertyGrid::OnComboItemPaint( const wxPGComboBox* pCb,
|
||||
|
||||
if ( renderer )
|
||||
renderer->PostDrawCell(dc, this, *cell, renderFlags);
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
// MeasureItem call
|
||||
|
||||
p->OnCustomPaint( dc, rect, paintdata );
|
||||
rect.height = paintdata.m_drawnHeight + 2;
|
||||
rect.width = cis.x + wxCC_CUSTOM_IMAGE_MARGIN1 + wxCC_CUSTOM_IMAGE_MARGIN2 + 9;
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
|
Reference in New Issue
Block a user