Skip to content
Snippets Groups Projects
Commit 960151e0 authored by Vadim ProductEngine's avatar Vadim ProductEngine
Browse files

STORM-727 FIXED Don't disable Close and Back buttons in the Create Landmark...

STORM-727 FIXED Don't disable Close and Back buttons in the Create Landmark panel, so you can go back if the landmark fails to load.

The bug was introduced in the fix of EXT-4700 (Creating a landmark brings up the Landmark sidepanel info twice).
To avoid reopening the "Create Landmark" panel, its Back and Close buttons were disabled.
However, the same fix removed the code for reopening the panel, so I can't see why we need to disable the buttons at all.
parent ef27fe3c
No related branches found
No related tags found
No related merge requests found
...@@ -330,8 +330,7 @@ BOOL LLPanelPlaces::postBuild() ...@@ -330,8 +330,7 @@ BOOL LLPanelPlaces::postBuild()
mPlaceProfileBackBtn = mPlaceProfile->getChild<LLButton>("back_btn"); mPlaceProfileBackBtn = mPlaceProfile->getChild<LLButton>("back_btn");
mPlaceProfileBackBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this)); mPlaceProfileBackBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this));
mLandmarkInfoBackBtn = mLandmarkInfo->getChild<LLButton>("back_btn"); mLandmarkInfo->getChild<LLButton>("back_btn")->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this));
mLandmarkInfoBackBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this));
LLLineEditor* title_editor = mLandmarkInfo->getChild<LLLineEditor>("title_editor"); LLLineEditor* title_editor = mLandmarkInfo->getChild<LLLineEditor>("title_editor");
title_editor->setKeystrokeCallback(boost::bind(&LLPanelPlaces::onEditButtonClicked, this), NULL); title_editor->setKeystrokeCallback(boost::bind(&LLPanelPlaces::onEditButtonClicked, this), NULL);
...@@ -384,12 +383,7 @@ void LLPanelPlaces::onOpen(const LLSD& key) ...@@ -384,12 +383,7 @@ void LLPanelPlaces::onOpen(const LLSD& key)
mLandmarkInfo->displayParcelInfo(LLUUID(), mPosGlobal); mLandmarkInfo->displayParcelInfo(LLUUID(), mPosGlobal);
// 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); mSaveBtn->setEnabled(FALSE);
mCloseBtn->setEnabled(FALSE);
mLandmarkInfoBackBtn->setEnabled(FALSE);
} }
else if (mPlaceInfoType == LANDMARK_INFO_TYPE) else if (mPlaceInfoType == LANDMARK_INFO_TYPE)
{ {
...@@ -497,8 +491,6 @@ void LLPanelPlaces::setItem(LLInventoryItem* item) ...@@ -497,8 +491,6 @@ void LLPanelPlaces::setItem(LLInventoryItem* item)
mEditBtn->setEnabled(is_landmark_editable); mEditBtn->setEnabled(is_landmark_editable);
mSaveBtn->setEnabled(is_landmark_editable); mSaveBtn->setEnabled(is_landmark_editable);
mCloseBtn->setEnabled(TRUE);
mLandmarkInfoBackBtn->setEnabled(TRUE);
if (is_landmark_editable) if (is_landmark_editable)
{ {
...@@ -1137,13 +1129,6 @@ void LLPanelPlaces::updateVerbs() ...@@ -1137,13 +1129,6 @@ void LLPanelPlaces::updateVerbs()
{ {
mTeleportBtn->setEnabled(have_3d_pos); 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 else
{ {
......
...@@ -116,7 +116,6 @@ class LLPanelPlaces : public LLPanel ...@@ -116,7 +116,6 @@ class LLPanelPlaces : public LLPanel
LLToggleableMenu* mLandmarkMenu; LLToggleableMenu* mLandmarkMenu;
LLButton* mPlaceProfileBackBtn; LLButton* mPlaceProfileBackBtn;
LLButton* mLandmarkInfoBackBtn;
LLButton* mTeleportBtn; LLButton* mTeleportBtn;
LLButton* mShowOnMapBtn; LLButton* mShowOnMapBtn;
LLButton* mEditBtn; LLButton* mEditBtn;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment