diff --git a/src/xrc/xh_sizer.cpp b/src/xrc/xh_sizer.cpp index 9ff053c5b2..8e5e9793c4 100644 --- a/src/xrc/xh_sizer.cpp +++ b/src/xrc/xh_sizer.cpp @@ -239,8 +239,10 @@ wxObject* wxSizerXmlHandler::Handle_sizer() sizer->Fit(m_parentAsWindow); m_node = nd; - if (m_parentAsWindow->GetWindowStyle() & (wxMAXIMIZE_BOX | wxRESIZE_BORDER)) + if (m_parentAsWindow->IsTopLevel()) + { sizer->SetSizeHints(m_parentAsWindow); + } } return sizer;