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;
|
wxDC& dc = *pDc;
|
||||||
dc.SetBrush(*wxWHITE_BRUSH);
|
dc.SetBrush(*wxWHITE_BRUSH);
|
||||||
|
|
||||||
if ( rect.x >= 0 )
|
|
||||||
{
|
|
||||||
//
|
//
|
||||||
// DrawItem call
|
// DrawItem call
|
||||||
wxPGCellRenderer* renderer = NULL;
|
wxPGCellRenderer* renderer = NULL;
|
||||||
@@ -952,16 +950,6 @@ void wxPropertyGrid::OnComboItemPaint( const wxPGComboBox* pCb,
|
|||||||
if ( renderer )
|
if ( renderer )
|
||||||
renderer->PostDrawCell(dc, this, *cell, renderFlags);
|
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
|
static
|
||||||
bool wxPGChoiceEditor_SetCustomPaintWidth( wxPropertyGrid* propGrid, wxPGComboBox* cb, int cmnVal )
|
bool wxPGChoiceEditor_SetCustomPaintWidth( wxPropertyGrid* propGrid, wxPGComboBox* cb, int cmnVal )
|
||||||
|
Reference in New Issue
Block a user