summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/llaccordionctrl.h2
-rw-r--r--indra/llui/llaccordionctrltab.cpp24
-rw-r--r--indra/llui/llflatlistview.cpp19
3 files changed, 25 insertions, 20 deletions
diff --git a/indra/llui/llaccordionctrl.h b/indra/llui/llaccordionctrl.h
index 8241ee1518..f26a380e5f 100644
--- a/indra/llui/llaccordionctrl.h
+++ b/indra/llui/llaccordionctrl.h
@@ -141,6 +141,8 @@ public:
const LLAccordionCtrlTab* getSelectedTab() const { return mSelectedTab; }
+ bool getFitParent() const {return mFitParent;}
+
private:
void initNoTabsWidget(const LLTextBox::Params& tb_params);
void updateNoTabsHelpTextVisibility();
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);
}
diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp
index 12004e2a75..5b4fee0051 100644
--- a/indra/llui/llflatlistview.cpp
+++ b/indra/llui/llflatlistview.cpp
@@ -1060,25 +1060,6 @@ void LLFlatListView::setNoItemsCommentVisible(bool visible) const
{
if (mNoItemsCommentTextbox)
{
- if (visible)
- {
-/*
-// *NOTE: MA 2010-02-04
-// Deprecated after params of the comment text box were moved into widget (flat_list_view.xml)
-// can be removed later if nothing happened.
- // We have to update child rect here because of issues with rect after reshaping while creating LLTextbox
- // It is possible to have invalid LLRect if Flat List is in LLAccordionTab
- LLRect comment_rect = getLocalRect();
-
- // To see comment correctly (EXT - 3244) in mNoItemsCommentTextbox we must get border width
- // of LLFlatListView (@see getBorderWidth()) and stretch mNoItemsCommentTextbox to this width
- // But getBorderWidth() returns 0 if LLFlatListView not visible. So we have to get border width
- // from 'scroll_border'
- LLViewBorder* scroll_border = getChild<LLViewBorder>("scroll border");
- comment_rect.stretch(-scroll_border->getBorderWidth());
- mNoItemsCommentTextbox->setRect(comment_rect);
-*/
- }
mSelectedItemsBorder->setVisible(!visible);
mNoItemsCommentTextbox->setVisible(visible);
}