From d58b5342dc7e8f49ab956523a3dc743b89803b3a Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Fri, 2 Dec 2011 19:10:08 +0200 Subject: EXP-1476 FIXED (Moving speak button to empty toolbar while incoming/outgoing call dialog is open does not move the dialog as well) Reason: A floater can be docked only to a button which is in visible chain, the visibility of the button itself is not enough. After the button was added to the empty toolbar: mButtonAddSignal is called and the floater tries to dock to the button, but the button's parent(mButtonPanel) is yet invisible at this moment (so the button is not in visible chain). mButtonPanel visibility updates in draw() depending on whether it contains some buttons or not. Solution: Updating mButtonPanel visibility right after the button was added, before mButtonAddSignal --- indra/llui/lltoolbar.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/llui/lltoolbar.cpp') diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index e7642ae190..7f96c1373c 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -770,6 +770,12 @@ void LLToolBar::updateLayoutAsNeeded() // re-center toolbar buttons mCenteringStack->updateLayout(); + if (!mButtons.empty()) + { + mButtonPanel->setVisible(TRUE); + mButtonPanel->setMouseOpaque(TRUE); + } + // don't clear flag until after we've resized ourselves, to avoid laying out every frame mNeedsLayout = false; } -- cgit v1.2.3