summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelplaces.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-08-12 01:12:27 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-08-12 01:12:27 +0000
commit0bf4b5f2222ffb8171be094613363427f3b8470a (patch)
tree4b742d6815f44a85c98113e9c5a3017eafc5968d /indra/newview/llpanelplaces.cpp
parent8d7e56f219d0915e2c4a19baf2809dbc6ede7fa5 (diff)
merge https://svn.aws.productengine.com/secondlife/export-from-ll@1277 https://svn.aws.productengine.com/secondlife/pe/stable-1@1297 -> viewer-2-0
Fixes: EXT 208 EXT 366 EXT-211 EXT-245 EXT-246 EXT-278 EXT-279 EXT-280 EXT-298 EXT-301 EXT-304 EXT-311 EXT-317 EXT-318 EXT-319 EXT-339 EXT-343 EXT-344 EXT-346 EXT-349 EXT-350 EXT-351 EXT-354 EXT-355 EXT-358 EXT-360 EXT-362 EXT-369 EXT-372 EXT-374 EXT-381 EXT-382 EXT-383 EXT-395 EXT-396 EXT-412 Other changes: Movement & Caemra controls work Profile and Me panel refactoring Notification refactoring
Diffstat (limited to 'indra/newview/llpanelplaces.cpp')
-rw-r--r--indra/newview/llpanelplaces.cpp23
1 files changed, 18 insertions, 5 deletions
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index 191c43791d..7461d150c8 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -293,7 +293,7 @@ void LLPanelPlaces::onTeleportButtonClicked()
payload["asset_id"] = mItem->getAssetUUID();
LLNotifications::instance().add("TeleportFromLandmark", LLSD(), payload);
}
- else if (mPlaceInfoType == "remote_place")
+ else if (mPlaceInfoType == "remote_place" || mPlaceInfoType == "agent")
{
LLFloaterWorldMap* worldmap_instance = LLFloaterWorldMap::getInstance();
if (!mPosGlobal.isExactlyZero() && worldmap_instance)
@@ -380,6 +380,11 @@ void LLPanelPlaces::toggleMediaPanel()
return;
mPlaceInfo->toggleMediaPanel(!mPlaceInfo->isMediaPanelVisible());
+
+ // Refresh the current place info because
+ // the media panel controls can't refer to
+ // the remote parcel media.
+ onOpen(LLSD().insert("type", "agent"));
}
void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible)
@@ -445,10 +450,14 @@ void LLPanelPlaces::onAgentParcelChange()
if (!mPlaceInfo)
return;
- if (mPlaceInfo->getVisible() && (mPlaceInfoType == "agent" || mPlaceInfoType == "create_landmark"))
+ if (mPlaceInfo->getVisible() && mPlaceInfoType == "create_landmark")
{
onOpen(LLSD().insert("type", mPlaceInfoType));
}
+ else if (mPlaceInfo->isMediaPanelVisible())
+ {
+ onOpen(LLSD().insert("type", "agent"));
+ }
else
{
updateVerbs();
@@ -463,6 +472,7 @@ void LLPanelPlaces::updateVerbs()
bool is_place_info_visible = mPlaceInfo->getVisible();
bool is_agent_place_info_visible = mPlaceInfoType == "agent";
bool is_create_landmark_visible = mPlaceInfoType == "create_landmark";
+ bool is_media_panel_visible = mPlaceInfo->isMediaPanelVisible();
mTeleportBtn->setVisible(!is_create_landmark_visible);
mShareBtn->setVisible(!is_create_landmark_visible);
@@ -477,15 +487,18 @@ void LLPanelPlaces::updateVerbs()
{
if (is_agent_place_info_visible)
{
- // We don't need to teleport to the current location so disable the button
- mTeleportBtn->setEnabled(FALSE);
+ // We don't need to teleport to the current location
+ // so check if the location is not within the current parcel.
+ mTeleportBtn->setEnabled(!is_media_panel_visible &&
+ !mPosGlobal.isExactlyZero() &&
+ !LLViewerParcelMgr::getInstance()->inAgentParcel(mPosGlobal));
}
else if (mPlaceInfoType == "landmark" || mPlaceInfoType == "remote_place")
{
mTeleportBtn->setEnabled(TRUE);
}
- mShowOnMapBtn->setEnabled(TRUE);
+ mShowOnMapBtn->setEnabled(!is_media_panel_visible);
}
else
{