From 66b60a71f1af684ed04882fff519f967c4d455f1 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Thu, 4 Mar 2010 19:37:26 +0200 Subject: Implemented normal subtasks EXT-5906 (Reverse buttons order in the inventory offers) and EXT-5907 (Reverse buttons order in the friendship offer). - Used reverse iterator when iterating over control list in LLChatHistory::appendMessage(). --HG-- branch : product-engine --- indra/newview/llchathistory.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index e1c96d4a16..911ac9c485 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -743,7 +743,9 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL ctrl_list_t ctrls = notify_box->getControlPanel()->getCtrlList(); S32 offset = 0; - for (ctrl_list_t::iterator it = ctrls.begin(); it != ctrls.end(); it++) + // Children were added by addChild() which uses push_front to insert them into list, + // so to get buttons in correct order reverse iterator is used (EXT-5906) + for (ctrl_list_t::reverse_iterator it = ctrls.rbegin(); it != ctrls.rend(); it++) { LLButton * button = dynamic_cast (*it); if (button != NULL) -- cgit v1.2.3