summaryrefslogtreecommitdiff
path: root/indra/llui/llaccordionctrltab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llaccordionctrltab.cpp')
-rw-r--r--indra/llui/llaccordionctrltab.cpp39
1 files changed, 3 insertions, 36 deletions
diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp
index fb9fff385d..37fc571bbd 100644
--- a/indra/llui/llaccordionctrltab.cpp
+++ b/indra/llui/llaccordionctrltab.cpp
@@ -33,7 +33,6 @@
#include "linden_common.h"
#include "llaccordionctrltab.h"
-#include "llaccordionctrl.h"
#include "lllocalcliprect.h"
#include "llscrollbar.h"
@@ -372,11 +371,9 @@ LLAccordionCtrlTab::LLAccordionCtrlTab(const LLAccordionCtrlTab::Params&p)
mHeader = LLUICtrlFactory::create<LLAccordionCtrlTabHeader>(headerParams);
addChild(mHeader, 1);
- LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLAccordionCtrlTab::selectOnFocusReceived, this));
-
- if (!p.selection_enabled)
+ if (p.selection_enabled)
{
- LLFocusableElement::setFocusLostCallback(boost::bind(&LLAccordionCtrlTab::deselectOnFocusLost, this));
+ LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLAccordionCtrlTab::selectOnFocusReceived, this));
}
reshape(100, 200,FALSE);
@@ -601,15 +598,6 @@ void LLAccordionCtrlTab::selectOnFocusReceived()
getParent()->notifyParent(LLSD().with("action", "select_current"));
}
-void LLAccordionCtrlTab::deselectOnFocusLost()
-{
- if(getParent()) // A parent may not be set if tabs are added dynamically.
- {
- getParent()->notifyParent(LLSD().with("action", "deselect_current"));
- }
-
-}
-
S32 LLAccordionCtrlTab::getHeaderHeight()
{
return mHeaderVisible?HEADER_HEIGHT:0;
@@ -710,7 +698,7 @@ S32 LLAccordionCtrlTab::notifyParent(const LLSD& info)
setRect(panel_rect);
}
- //LLAccordionCtrl should rearrange accordion tab if one of accordion change its size
+ //LLAccordionCtrl should rearrange accodion 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;
@@ -721,27 +709,6 @@ 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);
}