aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llpanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llui/llpanel.cpp')
-rw-r--r--linden/indra/llui/llpanel.cpp45
1 files changed, 44 insertions, 1 deletions
diff --git a/linden/indra/llui/llpanel.cpp b/linden/indra/llui/llpanel.cpp
index 28780c7..709342b 100644
--- a/linden/indra/llui/llpanel.cpp
+++ b/linden/indra/llui/llpanel.cpp
@@ -402,7 +402,9 @@ void LLPanel::setBorderVisible(BOOL b)
402// virtual 402// virtual
403LLXMLNodePtr LLPanel::getXML(bool save_children) const 403LLXMLNodePtr LLPanel::getXML(bool save_children) const
404{ 404{
405 LLXMLNodePtr node = LLView::getXML(); 405 LLXMLNodePtr node = LLUICtrl::getXML();
406
407 node->setName(LL_PANEL_TAG);
406 408
407 if (mBorder && mBorder->getVisible()) 409 if (mBorder && mBorder->getVisible())
408 { 410 {
@@ -418,6 +420,15 @@ LLXMLNodePtr LLPanel::getXML(bool save_children) const
418 { 420 {
419 node->createChild("label", TRUE)->setStringValue(mLabel); 421 node->createChild("label", TRUE)->setStringValue(mLabel);
420 } 422 }
423
424 ui_string_map_t::const_iterator i = mUIStrings.begin();
425 ui_string_map_t::const_iterator end = mUIStrings.end();
426 for (; i != end; ++i)
427 {
428 LLXMLNodePtr child_node = node->createChild("string", FALSE);
429 child_node->setStringValue(i->second);
430 child_node->createChild("name", TRUE)->setStringValue(i->first);
431 }
421 432
422 if (save_children) 433 if (save_children)
423 { 434 {
@@ -1171,6 +1182,38 @@ void LLLayoutStack::removeCtrl(LLUICtrl* ctrl)
1171LLXMLNodePtr LLLayoutStack::getXML(bool save_children) const 1182LLXMLNodePtr LLLayoutStack::getXML(bool save_children) const
1172{ 1183{
1173 LLXMLNodePtr node = LLView::getXML(); 1184 LLXMLNodePtr node = LLView::getXML();
1185 node->setName(LL_LAYOUT_STACK_TAG);
1186
1187 if (mOrientation == HORIZONTAL)
1188 {
1189 node->createChild("orientation", TRUE)->setStringValue("horizontal");
1190 }
1191 else
1192 {
1193 node->createChild("orientation", TRUE)->setStringValue("vertical");
1194 }
1195
1196 if (save_children)
1197 {
1198 LLView::child_list_const_reverse_iter_t rit;
1199 for (rit = getChildList()->rbegin(); rit != getChildList()->rend(); ++rit)
1200 {
1201 LLView* childp = *rit;
1202
1203 if (childp->getSaveToXML())
1204 {
1205 LLXMLNodePtr xml_node = childp->getXML();
1206
1207 if (xml_node->hasName(LL_PANEL_TAG))
1208 {
1209 xml_node->setName(LL_LAYOUT_PANEL_TAG);
1210 }
1211
1212 node->addChild(xml_node);
1213 }
1214 }
1215 }
1216
1174 return node; 1217 return node;
1175} 1218}
1176 1219