]> git.saurik.com Git - wxWidgets.git/commitdiff
fix for placement of wxStaticBox childrens (which doesn't affect the placement of...
authorFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Fri, 1 May 2009 15:28:58 +0000 (15:28 +0000)
committerFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Fri, 1 May 2009 15:28:58 +0000 (15:28 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/sizer.cpp

index 98e184efdbb764a95a5e1f8690b887aad6872ac6..47d3d480813724bf512769b3e21b0bd4967d812f 100644 (file)
@@ -2165,6 +2165,17 @@ void wxStaticBoxSizer::RecalcSizes()
     m_size.x -= 2*other_border;
     m_size.y -= top_border + other_border;
 
+#ifdef __WXGTK20__
+    if (m_staticBox->GetChildren().GetCount() > 0)
+    {
+        // if the wxStaticBox has created a wxPizza to contain its children
+        // (see wxStaticBox::AddChild) then we need to place the items it contains
+        // in the wxBoxSizer::RecalcSizes() call below using coordinates relative 
+        // to the top-left corner of the staticbox:
+        m_position.x = m_position.y = 0;
+    }
+#endif
+
     wxBoxSizer::RecalcSizes();
 
     m_position = old_pos;