- if (n->GetType() == wxXML_ELEMENT_NODE)
- {
- bool old_ins = m_IsInside;
- wxSizer *old_par = m_ParentSizer;
- m_IsInside = FALSE;
- if (!IsSizerNode(n)) m_ParentSizer = NULL;
- wxObject *item = CreateResFromNode(n, m_Parent, NULL);
- m_IsInside = old_ins;
- m_ParentSizer = old_par;
- wxSizer *sizer = wxDynamicCast(item, wxSizer);
- wxWindow *wnd = wxDynamicCast(item, wxWindow);
- wxSize minsize = GetSize(_T("minsize"));
-
- if (sizer)
- {
- m_ParentSizer->Add(sizer, GetLong(_T("option")),
- GetStyle(_T("flag")), GetDimension(_T("border")));
- if (!(minsize == wxDefaultSize))
- m_ParentSizer->SetItemMinSize(sizer, minsize.x, minsize.y);
- }
- else if (wnd)
- {
- m_ParentSizer->Add(wnd, GetLong(_T("option")),
- GetStyle(_T("flag")), GetDimension(_T("border")));
- if (!(minsize == wxDefaultSize))
- m_ParentSizer->SetItemMinSize(wnd, minsize.x, minsize.y);
- }
- else
- wxLogError(_T("Error in resource."));
-
- return item;
+ bool old_ins = m_isInside;
+ wxSizer *old_par = m_parentSizer;
+ m_isInside = FALSE;
+ if (!IsSizerNode(n)) m_parentSizer = NULL;
+ wxObject *item = CreateResFromNode(n, m_parent, NULL);
+ m_isInside = old_ins;
+ m_parentSizer = old_par;
+ wxSizer *sizer = wxDynamicCast(item, wxSizer);
+ wxWindow *wnd = wxDynamicCast(item, wxWindow);
+ wxSize minsize = GetSize(wxT("minsize"));
+
+ if (sizer)
+ {
+ m_parentSizer->Add(sizer, GetLong(wxT("option")),
+ GetStyle(wxT("flag")), GetDimension(wxT("border")));
+ if (!(minsize == wxDefaultSize))
+ m_parentSizer->SetItemMinSize(sizer, minsize.x, minsize.y);