diff options
Diffstat (limited to 'indra/llui/llaccordionctrltab.cpp')
-rw-r--r-- | indra/llui/llaccordionctrltab.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index d8760d5cdb..fb9fff385d 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -33,6 +33,7 @@ #include "linden_common.h" #include "llaccordionctrltab.h" +#include "llaccordionctrl.h" #include "lllocalcliprect.h" #include "llscrollbar.h" @@ -709,7 +710,7 @@ S32 LLAccordionCtrlTab::notifyParent(const LLSD& info) setRect(panel_rect); } - //LLAccordionCtrl should rearrange accodion tab if one of accordion change its size + //LLAccordionCtrl should rearrange accordion tab if one of accordion change its size if (getParent()) // A parent may not be set if tabs are added dynamically. getParent()->notifyParent(info); return 1; @@ -720,6 +721,27 @@ S32 LLAccordionCtrlTab::notifyParent(const LLSD& info) return 1; } } + else if (info.has("scrollToShowRect")) + { + LLAccordionCtrl* parent = dynamic_cast<LLAccordionCtrl*>(getParent()); + if (parent && parent->getFitParent()) + { + // EXT-8285 ('No attachments worn' text appears at the bottom of blank 'Attachments' accordion) + // The problem was in passing message "scrollToShowRect" IN LLAccordionCtrlTab::notifyParent + // FROM child LLScrollContainer TO parent LLAccordionCtrl with "it_parent" set to true. + + // It is wrong notification for parent accordion which leads to recursive call of adjustContainerPanel + // As the result of recursive call of adjustContainerPanel we got LLAccordionCtrlTab + // that reshaped and re-sized with different rectangles. + + // LLAccordionCtrl has own scrollContainer and LLAccordionCtrlTab has own scrollContainer + // both should handle own scroll container's event. + // So, if parent accordion "fit_parent" accordion tab should handle its scroll container events itself. + + return 1; + } + } + return LLUICtrl::notifyParent(info); } |