EXT-7328 FIX If accordion tab has "fit_to_panel" flag on its height shouldn't be changed while arranging accordion tabs even if its the only tab in ctrl.

reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/533/

--HG--
branch : product-engine
master
Yuri Chebotarev 2010-06-09 13:16:21 +03:00
parent 045af3acc7
commit 60a92dbaa4
2 changed files with 4 additions and 1 deletions

View File

@ -352,7 +352,7 @@ void LLAccordionCtrl::addCollapsibleCtrl(LLView* view)
mAccordionTabs.push_back(accordion_tab);
accordion_tab->setDropDownStateChangedCallback( boost::bind(&LLAccordionCtrl::onCollapseCtrlCloseOpen, this, mAccordionTabs.size() - 1) );
arrange();
}
void LLAccordionCtrl::removeCollapsibleCtrl(LLView* view)
@ -541,6 +541,8 @@ void LLAccordionCtrl::arrange()
S32 panel_height = getRect().getHeight() - 2*BORDER_MARGIN;
if (accordion_tab->getFitParent())
panel_height = accordion_tab->getRect().getHeight();
ctrlSetLeftTopAndSize(accordion_tab,panel_rect.mLeft,panel_top,panel_width,panel_height);
show_hide_scrollbar(getRect().getWidth(),getRect().getHeight());

View File

@ -190,6 +190,7 @@ public:
void showAndFocusHeader();
void setFitPanel( bool fit ) { mFitPanel = true; }
bool getFitParent() const { return mFitPanel; }
protected:
void adjustContainerPanel (const LLRect& child_rect);