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