]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't move the slider's value label if it's not being used.
authorDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Mon, 19 Dec 2011 12:12:31 +0000 (12:12 +0000)
committerDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Mon, 19 Dec 2011 12:12:31 +0000 (12:12 +0000)
An if statement was missing brackets and still moving the value label.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70046 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/slider.cpp

index 7c1c7103f24bc49a62c6874d03924acbe66b6906..533303b4090a5469cb61a4df8caa42eb43e33c5a 100644 (file)
@@ -465,11 +465,13 @@ void wxSlider::DoMoveWindow(int x, int y, int width, int height)
                     holdBottomWidth, labelHeight);
             }
             if ( HasFlag(wxSL_VALUE_LABEL) )
+            {
                 labelOffset = longestLabelWidth + HGAP;
                 DoMoveSibling((HWND)(*m_labels)[SliderLabel_Value],
                 x,
                 y + (height - labelHeight)/2,
                 longestLabelWidth, labelHeight);
+            }
         }
 
         // position the slider itself along the left/right edge