X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/69ce77e25a8c6b3b1682b2f9ae7aeac1cecb4e6a..6e1609b1e0784f299933742e02c58462df809acc:/src/xrc/xh_sizer.cpp diff --git a/src/xrc/xh_sizer.cpp b/src/xrc/xh_sizer.cpp index b77b9a5cfe..9ff053c5b2 100644 --- a/src/xrc/xh_sizer.cpp +++ b/src/xrc/xh_sizer.cpp @@ -144,9 +144,9 @@ wxObject* wxSizerXmlHandler::Handle_sizeritem() wxWindow *wnd = wxDynamicCast(item, wxWindow); if (sizer) - sitem->SetSizer(sizer); + sitem->AssignSizer(sizer); else if (wnd) - sitem->SetWindow(wnd); + sitem->AssignWindow(wnd); else wxLogError(wxT("Error in resource.")); @@ -170,7 +170,7 @@ wxObject* wxSizerXmlHandler::Handle_spacer() wxSizerItem* sitem = MakeSizerItem(); SetSizerItemAttributes(sitem); - sitem->SetSpacer(GetSize()); + sitem->AssignSpacer(GetSize()); AddSizerItem(sitem); return NULL; } @@ -361,6 +361,9 @@ void wxSizerXmlHandler::SetSizerItemAttributes(wxSizerItem* sitem) gbsitem->SetPos(GetGBPos(wxT("cellpos"))); gbsitem->SetSpan(GetGBSpan(wxT("cellspan"))); } + + // record the id of the item, if any, for use by XRCSIZERITEM() + sitem->SetId(GetID()); } void wxSizerXmlHandler::AddSizerItem(wxSizerItem* sitem)