summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterexperienceprofile.cpp
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2015-11-05 19:40:26 +0200
committerandreykproductengine <akleshchev@productengine.com>2015-11-05 19:40:26 +0200
commit7d88f8814b2f4f409d182a6cabcd62b04ee4df89 (patch)
tree4d2e794a9065d6d218b728612c880fddd34b9d4e /indra/newview/llfloaterexperienceprofile.cpp
parentf1ddcfeb1d1530bf2b8ef8da3cdfe6bdb68e013f (diff)
SL-192 Edit Experience Profile shows up once an Exp is acquired
Diffstat (limited to 'indra/newview/llfloaterexperienceprofile.cpp')
-rw-r--r--indra/newview/llfloaterexperienceprofile.cpp29
1 files changed, 24 insertions, 5 deletions
diff --git a/indra/newview/llfloaterexperienceprofile.cpp b/indra/newview/llfloaterexperienceprofile.cpp
index 197162487d..4d60d01922 100644
--- a/indra/newview/llfloaterexperienceprofile.cpp
+++ b/indra/newview/llfloaterexperienceprofile.cpp
@@ -117,12 +117,20 @@ LLExperienceHandler gExperienceHandler;
LLFloaterExperienceProfile::LLFloaterExperienceProfile(const LLSD& data)
: LLFloater(data)
- , mExperienceId(data.asUUID())
, mSaveCompleteAction(NOTHING)
, mDirty(false)
, mForceClose(false)
{
-
+ if (data.has("experience_id"))
+ {
+ mExperienceId = data["experience_id"].asUUID();
+ mPostEdit = data.has("edit_experience") && data["edit_experience"].asBoolean();
+ }
+ else
+ {
+ mExperienceId = data.asUUID();
+ mPostEdit = false;
+ }
}
@@ -356,9 +364,7 @@ bool LLFloaterExperienceProfile::experiencePermission( LLHandle<LLFloaterExperie
void LLFloaterExperienceProfile::onClickEdit()
{
- LLTabContainer* tabs = getChild<LLTabContainer>("tab_container");
-
- tabs->selectTabByName("edit_panel_experience_info");
+ changeToEdit();
}
@@ -615,6 +621,12 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience )
mDirty=false;
mForceClose = false;
getChild<LLButton>(BTN_SAVE)->setEnabled(mDirty);
+
+ if (mPostEdit)
+ {
+ mPostEdit = false;
+ changeToEdit();
+ }
}
void LLFloaterExperienceProfile::setPreferences( const LLSD& content )
@@ -829,6 +841,13 @@ void LLFloaterExperienceProfile::changeToView()
}
}
+void LLFloaterExperienceProfile::changeToEdit()
+{
+ LLTabContainer* tabs = getChild<LLTabContainer>("tab_container");
+
+ tabs->selectTabByName("edit_panel_experience_info");
+}
+
void LLFloaterExperienceProfile::onClickLocation()
{
LLViewerRegion* region = gAgent.getRegion();