MAINT-6979 Scroll bar in Appearance -> Wearing jumps up to the top each time an attachment is detached

master
Mnikolenko Productengine 2016-12-08 16:24:50 +02:00
parent 391db15f85
commit b5f861ae84
3 changed files with 6 additions and 1 deletions

View File

@ -361,6 +361,7 @@ LLAccordionCtrlTab::LLAccordionCtrlTab(const LLAccordionCtrlTab::Params&p)
{
mStoredOpenCloseState = false;
mWasStateStored = false;
mSkipChangesOnNotifyParent = false;
mDropdownBGColor = LLColor4::white;
LLAccordionCtrlTabHeader::Params headerParams;
@ -691,7 +692,7 @@ S32 LLAccordionCtrlTab::notifyParent(const LLSD& info)
mExpandedHeight = height;
if(isExpanded())
if(isExpanded() && !mSkipChangesOnNotifyParent)
{
LLRect panel_rect = getRect();
panel_rect.setLeftTopAndSize( panel_rect.mLeft, panel_rect.mTop, panel_rect.getWidth(), height);

View File

@ -195,6 +195,8 @@ public:
void setFitPanel( bool fit ) { mFitPanel = true; }
bool getFitParent() const { return mFitPanel; }
void setIgnoreResizeNotification(bool ignore) { mSkipChangesOnNotifyParent = ignore;}
protected:
void adjustContainerPanel (const LLRect& child_rect);
void adjustContainerPanel ();
@ -235,6 +237,7 @@ private:
bool mStoredOpenCloseState;
bool mWasStateStored;
bool mSkipChangesOnNotifyParent;
bool mSelectionEnabled;

View File

@ -232,6 +232,7 @@ BOOL LLPanelWearing::postBuild()
{
mAccordionCtrl = getChild<LLAccordionCtrl>("wearables_accordion");
mWearablesTab = getChild<LLAccordionCtrlTab>("tab_wearables");
mWearablesTab->setIgnoreResizeNotification(true);
mAttachmentsTab = getChild<LLAccordionCtrlTab>("tab_temp_attachments");
mAttachmentsTab->setDropDownStateChangedCallback(boost::bind(&LLPanelWearing::onAccordionTabStateChanged, this));