X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/326462ae94e4b1d4fb6a8d56875ce0fcbd9d1c33..815f65bd0f673965230ed915d794497a8818dd35:/src/xrc/xh_treebk.cpp diff --git a/src/xrc/xh_treebk.cpp b/src/xrc/xh_treebk.cpp index efc5c36f99..591d8c50f0 100644 --- a/src/xrc/xh_treebk.cpp +++ b/src/xrc/xh_treebk.cpp @@ -76,6 +76,24 @@ wxObject *wxTreebookXmlHandler::DoCreateResource() CreateChildren(m_tbk, true/*only this handler*/); + wxXmlNode *node = GetParamNode("object"); + int pageIndex = 0; + for (unsigned int i = 0; i < m_tbk->GetPageCount(); i++) + { + if ( m_tbk->GetPage(i) ) + { + wxXmlNode *child = node->GetChildren(); + while (child) + { + if (child->GetName() == "expanded" && child->GetNodeContent() == "1") + m_tbk->ExpandNode(pageIndex, true); + + child = child->GetNext(); + } + pageIndex++; + } + } + m_treeContext = old_treeContext; m_isInside = old_ins; m_tbk = old_par;