void LLViewerWearable::revertValues() { #if 0 // DRANO avoid overwrite when not in local appearance if (isAgentAvatarValid() && gAgentAvatarp->isUsingServerBakes() && !gAgentAvatarp->isUsingLocalAppearance()) { return; } #endif LLWearable::revertValues(); LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLFloaterSidePanelContainer::getPanel("appearance")); if( panel ) { panel->updateScrollingPanelList(); } }
void LLWearable::saveValues() { //update saved settings so wearable is no longer dirty mSavedVisualParamMap.clear(); for (visual_param_index_map_t::const_iterator iter = mVisualParamIndexMap.begin(); iter != mVisualParamIndexMap.end(); ++iter) { S32 id = iter->first; LLVisualParam *wearable_param = iter->second; F32 value = wearable_param->getWeight(); mSavedVisualParamMap[id] = value; } // Deep copy of mTEMap (copies only those tes that are current, filling in defaults where needed) syncImages(mTEMap, mSavedTEMap); LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLFloaterSidePanelContainer::getPanel("appearance")); if( panel ) { panel->updateScrollingPanelList(); } }
// Checked: 2011-11-04 (RLVa-1.4.4a) | Modified: RLVa-1.4.4a void RlvUIEnabler::onToggleShowInv(bool fQuitting) { if (fQuitting) return; // Nothing to do if the viewer is shutting down bool fEnable = !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWINV); // // When disabling, close any inventory floaters that may be open // if (!fEnable) { LLFloaterReg::const_instance_list_t lFloaters = LLFloaterReg::getFloaterList("inventory"); for (LLFloaterReg::const_instance_list_t::const_iterator itFloater = lFloaters.begin(); itFloater != lFloaters.end(); ++itFloater) (*itFloater)->closeFloater(); LLFloaterReg::const_instance_list_t lSecFloaters = LLFloaterReg::getFloaterList("secondary_inventory"); for (LLFloaterReg::const_instance_list_t::const_iterator itSecFloater = lSecFloaters.begin(); itSecFloater != lSecFloaters.end(); ++itSecFloater) (*itSecFloater)->closeFloater(); } // // Enable/disable the "My Outfits" panel on the "My Appearance" sidebar tab // LLPanelOutfitsInventory* pAppearancePanel = LLPanelOutfitsInventory::findInstance(); RLV_ASSERT(pAppearancePanel); if (pAppearancePanel) { LLTabContainer* pAppearanceTabs = pAppearancePanel->getAppearanceTabs(); LLOutfitsList* pMyOutfitsPanel = pAppearancePanel->getMyOutfitsPanel(); if ( (pAppearanceTabs) && (pMyOutfitsPanel) ) { S32 idxTab = pAppearanceTabs->getIndexForPanel(pMyOutfitsPanel); RLV_ASSERT(-1 != idxTab); pAppearanceTabs->enableTabButton(idxTab, fEnable); // When disabling, switch to the COF tab if "My Outfits" is currently active if ( (!fEnable) && (pAppearanceTabs->getCurrentPanelIndex() == idxTab) ) pAppearanceTabs->selectTabPanel(pAppearancePanel->getCurrentOutfitPanel()); } LLSidepanelAppearance* pCOFPanel = pAppearancePanel->getAppearanceSP(); RLV_ASSERT(pCOFPanel); if ( (!fEnable) && (pCOFPanel) && (pCOFPanel->isOutfitEditPanelVisible()) ) { // TODO-RLVa: we should really just be collapsing the "Add more..." inventory panel (and disable the button) pCOFPanel->showOutfitsInventoryPanel(); } } // // Filter (or stop filtering) opening new inventory floaters // // <FS:Ansariel> Modified for FIRE-8804 if (!fEnable) { addGenericFloaterFilter("inventory"); addGenericFloaterFilter("secondary_inventory"); } else { removeGenericFloaterFilter("inventory"); removeGenericFloaterFilter("secondary_inventory"); } }