From abcb3a7306f95f66aadb3db2fa8cd4000bc0a8e5 Mon Sep 17 00:00:00 2001 From: Andrew Productengine Date: Wed, 24 Nov 2010 19:01:01 +0200 Subject: STORM-375 FIXED Fixed resetting of opened accordion on minimizing/unminimizing Appearance floater. The floater on minimization behaved the way consistent with Appearance panel in sidetray on visibility change. - To let LLSidepanelAppearance::updateToVisibility() determine whether to reset state or not, "reset_accordion" field was added to LLSD that it passed to it. It's value is different depending on where updateToVisibility() was called from. "visible" field was added to store boolean value that was passed before fix without name, but now can't be used that way. --- indra/newview/llsidepanelappearance.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'indra/newview/llsidepanelappearance.cpp') diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index 1999f14828..b316171604 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -183,12 +183,15 @@ void LLSidepanelAppearance::onOpen(const LLSD& key) void LLSidepanelAppearance::onVisibilityChange(const LLSD &new_visibility) { - updateToVisibility(new_visibility); + LLSD visibility; + visibility["visible"] = new_visibility.asBoolean(); + visibility["reset_accordion"] = true; + updateToVisibility(visibility); } void LLSidepanelAppearance::updateToVisibility(const LLSD &new_visibility) { - if (new_visibility.asBoolean()) + if (new_visibility["visible"].asBoolean()) { bool is_outfit_edit_visible = mOutfitEdit && mOutfitEdit->getVisible(); bool is_wearable_edit_visible = mEditWearable && mEditWearable->getVisible(); @@ -209,7 +212,7 @@ void LLSidepanelAppearance::updateToVisibility(const LLSD &new_visibility) } } - if (is_outfit_edit_visible) + if (is_outfit_edit_visible && new_visibility["reset_accordion"].asBoolean()) { mOutfitEdit->resetAccordionState(); } -- cgit v1.2.3