Use conditional operator instead of conditional statement

This commit is contained in:
Artur Wieczorek
2018-12-26 11:38:51 +01:00
parent a57aacd5af
commit 311e5e8414

View File

@@ -2124,11 +2124,7 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc,
wxBrush capbgbrush(m_colCapBack,wxBRUSHSTYLE_SOLID);
wxPen linepen(m_colLine,1,wxPENSTYLE_SOLID);
wxColour selBackCol;
if ( isPgEnabled )
selBackCol = m_colSelBack;
else
selBackCol = m_colMargin;
wxColour selBackCol = isPgEnabled ? m_colSelBack : m_colMargin;
// pen that has same colour as text
wxPen outlinepen(m_colPropFore,1,wxPENSTYLE_SOLID);