]> git.saurik.com Git - wxWidgets.git/commitdiff
Only test for centre flag of minor direction and ignore the other in wxBoxSizer ...
authorRobert Roebling <robert@roebling.de>
Thu, 25 Dec 2008 22:05:29 +0000 (22:05 +0000)
committerRobert Roebling <robert@roebling.de>
Thu, 25 Dec 2008 22:05:29 +0000 (22:05 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/sizer.cpp

index 98990a2ee106c0e5e946cfc9f9bf0b80980d2b7b..375f5c282496db1794aa40089a415a9e6fc64ed1 100644 (file)
@@ -1987,7 +1987,7 @@ void wxBoxSizer::RecalcSizes()
         }
         // NB: wxCENTRE is used here only for backwards compatibility,
         //     wxALIGN_CENTRE should be used in new code
-        else if ( flag & (wxCENTER | wxALIGN_CENTRE) )
+        else if ( flag & (wxCENTER | (IsVertical() ? wxALIGN_CENTRE_HORIZONTAL : wxALIGN_CENTRE_VERTICAL)))
         {
             PosInMinorDir(posChild) += (totalMinorSize - minorSize) / 2;
         }