Simplification to avoid unreachable code

This commit is contained in:
Paul Cornett 2019-08-25 21:03:21 -07:00
parent fca4ef0458
commit 453999737f

View File

@ -2203,18 +2203,18 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc,
bool suppressMarginEdge = (GetWindowStyle() & wxPG_HIDE_MARGIN) &&
(((GetWindowStyle() & wxBORDER_MASK) == wxBORDER_THEME) ||
(((GetWindowStyle() & wxBORDER_MASK) == wxBORDER_NONE) && ((GetParent()->GetWindowStyle() & wxBORDER_MASK) == wxBORDER_THEME)));
#else
bool suppressMarginEdge = false;
#endif
if (!suppressMarginEdge)
dc.DrawLine( greyDepth, y, greyDepth, y2 );
else
if (suppressMarginEdge)
{
// Blank out the margin edge
dc.SetPen(wxPen(GetBackgroundColour()));
dc.DrawLine( greyDepth, y, greyDepth, y2 );
dc.SetPen( linepen );
}
else
#endif // __WXMSW__
{
dc.DrawLine(greyDepth, y, greyDepth, y2);
}
// Splitters
for (unsigned int i = firstCol; i <= lastCol; i++)