summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrew Dyukov <adyukov@productengine.com>2010-03-04 19:37:26 +0200
committerAndrew Dyukov <adyukov@productengine.com>2010-03-04 19:37:26 +0200
commit66b60a71f1af684ed04882fff519f967c4d455f1 (patch)
treeb231265c375054c796855a6238bfac38d2011cdf /indra
parent4e08de74aeba2f5891d40cda0266927d0c9b59f0 (diff)
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
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llchathistory.cpp4
1 files changed, 3 insertions, 1 deletions
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<LLButton*> (*it);
if (button != NULL)