EXT-8188 FIXED Added SelectionEnabled flag to fix accordion tab header highlighting.

Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/735/.

--HG--
branch : product-engine
master
Sergei Litovchuk 2010-07-16 19:03:13 +03:00
parent 9137fd8e43
commit 053fa9dc9a
2 changed files with 5 additions and 2 deletions

View File

@ -358,6 +358,7 @@ LLAccordionCtrlTab::LLAccordionCtrlTab(const LLAccordionCtrlTab::Params&p)
,mPaddingBottom(p.padding_bottom)
,mCanOpenClose(true)
,mFitPanel(p.fit_panel)
,mSelectionEnabled(p.selection_enabled)
,mContainerPanel(NULL)
,mScrollbar(NULL)
{
@ -371,7 +372,7 @@ LLAccordionCtrlTab::LLAccordionCtrlTab(const LLAccordionCtrlTab::Params&p)
mHeader = LLUICtrlFactory::create<LLAccordionCtrlTabHeader>(headerParams);
addChild(mHeader, 1);
if (p.selection_enabled)
if (mSelectionEnabled)
{
LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLAccordionCtrlTab::selectOnFocusReceived, this));
}
@ -797,7 +798,7 @@ void LLAccordionCtrlTab::showAndFocusHeader()
{
LLAccordionCtrlTabHeader* header = getChild<LLAccordionCtrlTabHeader>(DD_HEADER_NAME);
header->setFocus(true);
header->setSelected(true);
header->setSelected(mSelectionEnabled);
LLRect screen_rc;
LLRect selected_rc = header->getRect();

View File

@ -241,6 +241,8 @@ private:
bool mStoredOpenCloseState;
bool mWasStateStored;
bool mSelectionEnabled;
LLScrollbar* mScrollbar;
LLView* mContainerPanel;