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:
Artur Wieczorek
2018-12-28 13:28:42 +01:00
parent b569a429a2
commit e13382f400

View File

@@ -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