diff options
author | Roxie Linden <roxie@lindenlab.com> | 2010-02-25 11:33:56 -0800 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2010-02-25 11:33:56 -0800 |
commit | 92cef0426df15c0e661fa795e6b00214f381dd05 (patch) | |
tree | 4aa5f2277e140e98c381bdcd0facba64d4f0deca /indra/newview/llcallfloater.cpp | |
parent | c6163fafaac9c72683b11894ed309d1f55a745c8 (diff) | |
parent | 7f61cde331880baa21801aa0c1c1ccf9dc57946f (diff) |
automated merge from trunk
Diffstat (limited to 'indra/newview/llcallfloater.cpp')
-rw-r--r-- | indra/newview/llcallfloater.cpp | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index f909c9e6c1..21496aaa89 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -54,6 +54,7 @@ #include "lllayoutstack.h" static void get_voice_participants_uuids(std::vector<LLUUID>& speakers_uuids); +void reshape_floater(LLCallFloater* floater, S32 delta_height); class LLNonAvatarCaller : public LLAvatarListItem { @@ -314,8 +315,33 @@ void LLCallFloater::updateSession() //hide "Leave Call" button for nearby chat bool is_local_chat = mVoiceType == VC_LOCAL_CHAT; - childSetVisible("leave_call_btn_panel", !is_local_chat); - + + LLPanel* leave_panel = findChild<LLPanel>("leave_call_btn_panel"); + if (leave_panel) + { + S32 delta = 0; + bool visible = !is_local_chat; + if ((bool)leave_panel->getVisible() != visible) + { + delta = visible + ? leave_panel->getRect().getHeight() + : -leave_panel->getRect().getHeight(); + } + leave_panel->setVisible(visible); + if (delta) + { + LLLayoutStack* stack = getChild<LLLayoutStack>("my_call_stack"); + BOOL animate = stack->getAnimate(); + // Disable animation to prevent layout updating in several frames. + // We need this to get work reshapeToFitContent properly, otherwise + // the height of leave_call_btn_panel won't be completely included. + stack->setAnimate(FALSE); + reshape_floater(this, delta); + // Restore animate state. + stack->setAnimate(animate); + } + } + refreshParticipantList(); updateAgentModeratorState(); |