From 640a91ab0b3b8ca8d3334516c19cfdbf5dc467b0 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Sat, 22 Sep 2007 04:40:51 +0000 Subject: [PATCH] use logical operator &&, not bitwise &; indentation fix git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/combocmn.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/common/combocmn.cpp b/src/common/combocmn.cpp index bf94d2253b..c39695b34b 100644 --- a/src/common/combocmn.cpp +++ b/src/common/combocmn.cpp @@ -1005,10 +1005,10 @@ void wxComboCtrlBase::CalculateAreas( int btnWidth ) { int newY = butHeight+(customBorder*2); SetClientSize(wxDefaultCoord,newY); - if ( m_bmpNormal.Ok() || m_btnArea.width != butWidth || m_btnArea.height != butHeight ) - m_iFlags |= wxCC_IFLAG_HAS_NONSTANDARD_BUTTON; - else - m_iFlags &= ~wxCC_IFLAG_HAS_NONSTANDARD_BUTTON; + if ( m_bmpNormal.Ok() || m_btnArea.width != butWidth || m_btnArea.height != butHeight ) + m_iFlags |= wxCC_IFLAG_HAS_NONSTANDARD_BUTTON; + else + m_iFlags &= ~wxCC_IFLAG_HAS_NONSTANDARD_BUTTON; sz.y = newY; } @@ -1265,7 +1265,7 @@ void wxComboCtrlBase::PrepareBackground( wxDC& dc, const wxRect& rect, int flags { // Drawing control isEnabled = IsEnabled(); - doDrawFocusRect = ShouldDrawFocus() & !(m_iFlags & wxCC_FULL_BUTTON); + doDrawFocusRect = ShouldDrawFocus() && !(m_iFlags & wxCC_FULL_BUTTON); // Windows-style: for smaller size control (and for disabled background) use less spacing focusSpacingX = isEnabled ? 2 : 1; @@ -1275,7 +1275,7 @@ void wxComboCtrlBase::PrepareBackground( wxDC& dc, const wxRect& rect, int flags { // Drawing a list item isEnabled = true; // they are never disabled - doDrawFocusRect = flags & wxCONTROL_SELECTED ? true : false; + doDrawFocusRect = (flags & wxCONTROL_SELECTED) != 0; focusSpacingX = 0; focusSpacingY = 0; -- 2.45.2