From: Guillermo Rodriguez Garcia Date: Tue, 4 Jan 2000 16:18:44 +0000 (+0000) Subject: Corrected problem related to wxSIZE_ALLOW_MINUS_ONE X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ce96b7a010101e59a1a1c5b63fae52fb8231f367?ds=sidebyside Corrected problem related to wxSIZE_ALLOW_MINUS_ONE git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5236 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/radiobox.cpp b/src/msw/radiobox.cpp index fe2d803e2c..0bdbdb136a 100644 --- a/src/msw/radiobox.cpp +++ b/src/msw/radiobox.cpp @@ -368,9 +368,9 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags) int xx = x; int yy = y; - if (x == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) + if (x == -1 && !(sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) xx = currentX; - if (y == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) + if (y == -1 && !(sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) yy = currentY; #if RADIOBTN_PARENT_IS_RADIOBOX diff --git a/src/msw/slider95.cpp b/src/msw/slider95.cpp index 10a12ac3ef..ef1e073fbf 100644 --- a/src/msw/slider95.cpp +++ b/src/msw/slider95.cpp @@ -353,9 +353,9 @@ void wxSlider95::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); diff --git a/src/msw/slidrmsw.cpp b/src/msw/slidrmsw.cpp index a915542d62..1bb9b0876d 100644 --- a/src/msw/slidrmsw.cpp +++ b/src/msw/slidrmsw.cpp @@ -324,9 +324,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);