summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelplaces.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-01-28 12:48:48 -0800
committerTofu Linden <tofu.linden@lindenlab.com>2010-01-28 12:48:48 -0800
commit5a34cf1af83314774f11b0d24279794794bc9147 (patch)
tree720b576c642646f27d3e5b4f7ccba91b9e708371 /indra/newview/llpanelplaces.cpp
parent2795661869e3dbbfe1e6becec1d6bb3635eafd3b (diff)
parentfc8e185fafcfea1ead8b9c064ed38d5ac65f81b6 (diff)
Merge from viewer2 trunk.
Diffstat (limited to 'indra/newview/llpanelplaces.cpp')
-rw-r--r--indra/newview/llpanelplaces.cpp26
1 files changed, 18 insertions, 8 deletions
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index 7272a8a652..29cfbbe606 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -272,11 +272,11 @@ BOOL LLPanelPlaces::postBuild()
if (!mPlaceProfile || !mLandmarkInfo)
return FALSE;
- LLButton* back_btn = mPlaceProfile->getChild<LLButton>("back_btn");
- back_btn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this));
+ mPlaceProfileBackBtn = mPlaceProfile->getChild<LLButton>("back_btn");
+ mPlaceProfileBackBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this));
- back_btn = mLandmarkInfo->getChild<LLButton>("back_btn");
- back_btn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this));
+ mLandmarkInfoBackBtn = mLandmarkInfo->getChild<LLButton>("back_btn");
+ mLandmarkInfoBackBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this));
LLLineEditor* title_editor = mLandmarkInfo->getChild<LLLineEditor>("title_editor");
title_editor->setKeystrokeCallback(boost::bind(&LLPanelPlaces::onEditButtonClicked, this), NULL);
@@ -327,9 +327,12 @@ void LLPanelPlaces::onOpen(const LLSD& key)
mLandmarkInfo->displayParcelInfo(LLUUID(), mPosGlobal);
- // Disable Save button because there is no item to save yet.
- // The button will be enabled in onLandmarkLoaded callback.
+ // Disabling "Save", "Close" and "Back" buttons to prevent closing "Create Landmark"
+ // panel before created landmark is loaded.
+ // These buttons will be enabled when created landmark is added to inventory.
mSaveBtn->setEnabled(FALSE);
+ mCloseBtn->setEnabled(FALSE);
+ mLandmarkInfoBackBtn->setEnabled(FALSE);
}
else if (mPlaceInfoType == LANDMARK_INFO_TYPE)
{
@@ -437,6 +440,8 @@ void LLPanelPlaces::setItem(LLInventoryItem* item)
mEditBtn->setEnabled(is_landmark_editable);
mSaveBtn->setEnabled(is_landmark_editable);
+ mCloseBtn->setEnabled(TRUE);
+ mLandmarkInfoBackBtn->setEnabled(TRUE);
if (is_landmark_editable)
{
@@ -488,8 +493,6 @@ void LLPanelPlaces::onLandmarkLoaded(LLLandmark* landmark)
landmark->getGlobalPos(mPosGlobal);
mLandmarkInfo->displayParcelInfo(region_id, mPosGlobal);
- mSaveBtn->setEnabled(TRUE);
-
updateVerbs();
}
@@ -1030,6 +1033,13 @@ void LLPanelPlaces::updateVerbs()
{
mTeleportBtn->setEnabled(have_3d_pos);
}
+
+ // Do not enable landmark info Back button when we are waiting
+ // for newly created landmark to load.
+ if (!is_create_landmark_visible)
+ {
+ mLandmarkInfoBackBtn->setEnabled(TRUE);
+ }
}
else
{