X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f048e32fcd5260f33fbebdafbe1a0deeda175419..438e3558adf77a68f56b6e4d30b359f8361facac:/src/msw/slidrmsw.cpp diff --git a/src/msw/slidrmsw.cpp b/src/msw/slidrmsw.cpp index c6124f512c..7aa2ccfe03 100644 --- a/src/msw/slidrmsw.cpp +++ b/src/msw/slidrmsw.cpp @@ -29,9 +29,7 @@ #include "wx/msw/slidrmsw.h" #include "wx/msw/private.h" -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxSliderMSW, wxControl) -#endif // Slider wxSliderMSW::wxSliderMSW() @@ -54,7 +52,9 @@ bool wxSliderMSW::Create(wxWindow *parent, wxWindowID id, const wxString& name) { SetName(name); +#if wxUSE_VALIDATORS SetValidator(validator); +#endif // wxUSE_VALIDATORS if (parent) parent->AddChild(this); SetBackgroundColour(parent->GetBackgroundColour()) ; @@ -326,9 +326,9 @@ void wxSliderMSW::DoSetSize(int x, int y, int width, int height, int sizeFlags) int currentX, currentY; GetPosition(¤tX, ¤tY); - if (x == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) + if (x == -1 && !(sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) x1 = currentX; - if (y == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) + if (y == -1 && !(sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) y1 = currentY; AdjustForParentClientOrigin(x1, y1, sizeFlags);