]> git.saurik.com Git - wxWidgets.git/commitdiff
[1267725] Wrong operator for logical/bitwise operation
authorWłodzimierz Skiba <abx@abx.art.pl>
Wed, 24 Aug 2005 06:32:56 +0000 (06:32 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Wed, 24 Aug 2005 06:32:56 +0000 (06:32 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/univ/slider.h
src/univ/button.cpp
src/univ/slider.cpp

index 634085cf519978da8fdc07a2e9ef00aa7e17ec4e..8b6f3f95beb9de2338ded1fb56a8950e47c898fd 100644 (file)
@@ -95,13 +95,13 @@ public:
         { return IsVert() ? wxVERTICAL : wxHORIZONTAL; }
 
     // do we have labels?
-    bool HasLabels() const 
-        { return ((GetWindowStyle() & wxSL_LABELS) != 0) &
+    bool HasLabels() const
+        { return ((GetWindowStyle() & wxSL_LABELS) != 0) &&
                  ((GetWindowStyle() & (wxSL_TOP|wxSL_BOTTOM|wxSL_LEFT|wxSL_RIGHT)) != 0); }
 
     // do we have ticks?
-    bool HasTicks() const 
-        { return ((GetWindowStyle() & wxSL_TICKS) != 0) &
+    bool HasTicks() const
+        { return ((GetWindowStyle() & wxSL_TICKS) != 0) &&
                  ((GetWindowStyle() & (wxSL_TOP|wxSL_BOTTOM|wxSL_LEFT|wxSL_RIGHT|wxSL_BOTH)) != 0); }
 
     // implement wxControlWithThumb interface
index b70394dc5c6ea890b5d34c14a82d5f9892987ddc..a812e9e25e3fd186cffbe9959a1698ce9a329294 100644 (file)
@@ -81,7 +81,7 @@ bool wxButton::Create(wxWindow *parent,
     if (label.empty() && wxIsStockID(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,
                   _T("Some style conflicts with align flags") );
index d96bd7c500e0851dadb67b45a1fe2b10beeda523..aedda7a569bb43637f8fbd107b104e91a153af7b 100644 (file)
@@ -743,7 +743,7 @@ bool wxSlider::PerformAction(const wxControlAction& action,
                              long numArg,
                              const wxString& strArg)
 {
-     if ( action == wxACTION_SLIDER_START )
+    if ( action == wxACTION_SLIDER_START )
     {
         ChangeValueTo(m_min);
     }
@@ -823,13 +823,13 @@ wxScrollThumb::Shaft wxSlider::HitTest(const wxPoint& pt) const
         x3 = rectThumb.GetRight();
         x4 = rectShaft.GetRight();
     }
-    if ((x1 <= x) & (x < x2))
+    if ((x1 <= x) && (x < x2))
     {
         // or to the left
         return wxScrollThumb::Shaft_Above;
     }
 
-    if ((x3 < x) & (x <= x4)) {
+    if ((x3 < x) && (x <= x4)) {
         // or to the right
         return wxScrollThumb::Shaft_Below;
     }
@@ -952,7 +952,7 @@ bool wxStdSliderButtonInputHandler::HandleKey(wxInputConsumer *consumer,
                                               const wxKeyEvent& event,
                                               bool pressed)
 {
-   if ( pressed )
+    if ( pressed )
     {
         int keycode = event.GetKeyCode();