[1267725] Wrong operator for logical/bitwise operation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -95,13 +95,13 @@ public:
|
|||||||
{ return IsVert() ? wxVERTICAL : wxHORIZONTAL; }
|
{ return IsVert() ? wxVERTICAL : wxHORIZONTAL; }
|
||||||
|
|
||||||
// do we have labels?
|
// do we have labels?
|
||||||
bool HasLabels() const
|
bool HasLabels() const
|
||||||
{ return ((GetWindowStyle() & wxSL_LABELS) != 0) &
|
{ return ((GetWindowStyle() & wxSL_LABELS) != 0) &&
|
||||||
((GetWindowStyle() & (wxSL_TOP|wxSL_BOTTOM|wxSL_LEFT|wxSL_RIGHT)) != 0); }
|
((GetWindowStyle() & (wxSL_TOP|wxSL_BOTTOM|wxSL_LEFT|wxSL_RIGHT)) != 0); }
|
||||||
|
|
||||||
// do we have ticks?
|
// do we have ticks?
|
||||||
bool HasTicks() const
|
bool HasTicks() const
|
||||||
{ return ((GetWindowStyle() & wxSL_TICKS) != 0) &
|
{ return ((GetWindowStyle() & wxSL_TICKS) != 0) &&
|
||||||
((GetWindowStyle() & (wxSL_TOP|wxSL_BOTTOM|wxSL_LEFT|wxSL_RIGHT|wxSL_BOTH)) != 0); }
|
((GetWindowStyle() & (wxSL_TOP|wxSL_BOTTOM|wxSL_LEFT|wxSL_RIGHT|wxSL_BOTH)) != 0); }
|
||||||
|
|
||||||
// implement wxControlWithThumb interface
|
// implement wxControlWithThumb interface
|
||||||
|
@@ -81,7 +81,7 @@ bool wxButton::Create(wxWindow *parent,
|
|||||||
if (label.empty() && wxIsStockID(id))
|
if (label.empty() && wxIsStockID(id))
|
||||||
label = wxGetStockLabel(id);
|
label = wxGetStockLabel(id);
|
||||||
|
|
||||||
long ctrl_style = style & !wxBU_ALIGN_MASK;
|
long ctrl_style = style & ~wxBU_ALIGN_MASK;
|
||||||
|
|
||||||
wxASSERT_MSG( (ctrl_style & wxALIGN_MASK) == 0,
|
wxASSERT_MSG( (ctrl_style & wxALIGN_MASK) == 0,
|
||||||
_T("Some style conflicts with align flags") );
|
_T("Some style conflicts with align flags") );
|
||||||
|
@@ -743,7 +743,7 @@ bool wxSlider::PerformAction(const wxControlAction& action,
|
|||||||
long numArg,
|
long numArg,
|
||||||
const wxString& strArg)
|
const wxString& strArg)
|
||||||
{
|
{
|
||||||
if ( action == wxACTION_SLIDER_START )
|
if ( action == wxACTION_SLIDER_START )
|
||||||
{
|
{
|
||||||
ChangeValueTo(m_min);
|
ChangeValueTo(m_min);
|
||||||
}
|
}
|
||||||
@@ -823,13 +823,13 @@ wxScrollThumb::Shaft wxSlider::HitTest(const wxPoint& pt) const
|
|||||||
x3 = rectThumb.GetRight();
|
x3 = rectThumb.GetRight();
|
||||||
x4 = rectShaft.GetRight();
|
x4 = rectShaft.GetRight();
|
||||||
}
|
}
|
||||||
if ((x1 <= x) & (x < x2))
|
if ((x1 <= x) && (x < x2))
|
||||||
{
|
{
|
||||||
// or to the left
|
// or to the left
|
||||||
return wxScrollThumb::Shaft_Above;
|
return wxScrollThumb::Shaft_Above;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((x3 < x) & (x <= x4)) {
|
if ((x3 < x) && (x <= x4)) {
|
||||||
// or to the right
|
// or to the right
|
||||||
return wxScrollThumb::Shaft_Below;
|
return wxScrollThumb::Shaft_Below;
|
||||||
}
|
}
|
||||||
@@ -952,7 +952,7 @@ bool wxStdSliderButtonInputHandler::HandleKey(wxInputConsumer *consumer,
|
|||||||
const wxKeyEvent& event,
|
const wxKeyEvent& event,
|
||||||
bool pressed)
|
bool pressed)
|
||||||
{
|
{
|
||||||
if ( pressed )
|
if ( pressed )
|
||||||
{
|
{
|
||||||
int keycode = event.GetKeyCode();
|
int keycode = event.GetKeyCode();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user