From 3b2f456416d29534cb41fc9d4ad3bf195dcfc847 Mon Sep 17 00:00:00 2001 From: Cho Date: Fri, 18 Jul 2014 01:45:48 +0100 Subject: Added mLocationSLURL to fix ACME-1560 --- indra/newview/llfloaterexperienceprofile.cpp | 23 ++++++++++++----------- indra/newview/llfloaterexperienceprofile.h | 1 + 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/indra/newview/llfloaterexperienceprofile.cpp b/indra/newview/llfloaterexperienceprofile.cpp index 764d9088a1..4ee31f5df1 100644 --- a/indra/newview/llfloaterexperienceprofile.cpp +++ b/indra/newview/llfloaterexperienceprofile.cpp @@ -477,18 +477,18 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience ) LLTextEditor* edit_child = getChild(EDIT TF_DESC); edit_child->setText(value); - value = experience[LLExperienceCache::SLURL].asString(); + mLocationSLURL = experience[LLExperienceCache::SLURL].asString(); child = getChild(TF_SLURL); - bool has_value = value.length()>0; - locationPanel->setVisible(has_value); - value = LLSLURL(value).getSLURLString(); - child->setText(value); + bool has_slurl = mLocationSLURL.length()>0; + locationPanel->setVisible(has_slurl); + mLocationSLURL = LLSLURL(mLocationSLURL).getSLURLString(); + child->setText(mLocationSLURL); child = getChild(EDIT TF_SLURL); - if(has_value) + if(has_slurl) { - child->setText(value); + child->setText(mLocationSLURL); } else { @@ -829,7 +829,8 @@ void LLFloaterExperienceProfile::onClickLocation() if(region) { LLTextBox* child = getChild(EDIT TF_SLURL); - child->setText(LLSLURL(region->getName(), gAgent.getPositionGlobal()).getSLURLString()); + mLocationSLURL = LLSLURL(region->getName(), gAgent.getPositionGlobal()).getSLURLString(); + child->setText(mLocationSLURL); onFieldChanged(); } } @@ -837,6 +838,7 @@ void LLFloaterExperienceProfile::onClickLocation() void LLFloaterExperienceProfile::onClickClear() { LLTextBox* child = getChild(EDIT TF_SLURL); + mLocationSLURL = ""; child->setText(getString("empty_slurl")); onFieldChanged(); } @@ -916,14 +918,13 @@ void LLFloaterExperienceProfile::updatePackage() { mPackage[LLExperienceCache::NAME] = getChild(EDIT TF_NAME)->getText(); mPackage[LLExperienceCache::DESCRIPTION] = getChild(EDIT TF_DESC)->getText(); - std::string slurl = getChild(EDIT TF_SLURL)->getText(); - if(slurl == getString("empty_slurl")) + if(mLocationSLURL.empty()) { mPackage[LLExperienceCache::SLURL] = LLStringUtil::null; } else { - mPackage[LLExperienceCache::SLURL] = slurl; + mPackage[LLExperienceCache::SLURL] = mLocationSLURL; } mPackage[LLExperienceCache::MATURITY] = getChild(EDIT TF_MATURITY)->getSelectedValue().asInteger(); diff --git a/indra/newview/llfloaterexperienceprofile.h b/indra/newview/llfloaterexperienceprofile.h index b66df49a8a..78d54eb447 100644 --- a/indra/newview/llfloaterexperienceprofile.h +++ b/indra/newview/llfloaterexperienceprofile.h @@ -95,6 +95,7 @@ protected: LLUUID mExperienceId; LLSD mExperienceDetails; LLSD mPackage; + std::string mLocationSLURL; int mSaveCompleteAction; bool mDirty; bool mForceClose; -- cgit v1.2.3