diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 0b1ad79995..64952fad4f 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -57,6 +57,7 @@ #include "llviewerregion.h" #include "fsfloaterplacedetails.h" // [RLVa:KB] +#include "rlvactions.h" #include "rlvhandler.h" // [/RLVa:KB] @@ -753,7 +754,9 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const if (asset_uuid.isNull()) return false; // Disable "Show on Map" if landmark loading is in progress. - return !gLandmarkList.isAssetInLoadedCallbackMap(asset_uuid); + // RLVa fix + //return !gLandmarkList.isAssetInLoadedCallbackMap(asset_uuid); + return !gLandmarkList.isAssetInLoadedCallbackMap(asset_uuid) && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWWORLDMAP); } else if ("rename" == command_name) { @@ -762,6 +765,12 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const return canItemBeModified(command_name, selected_item); } + // RLVa fix + else if ("teleport" == command_name) + { + return !gRlvHandler.hasBehaviour(RLV_BHVR_TPLM); + } + // return true; } diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index d7b07dc5f8..92ea2a8aca 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -79,6 +79,7 @@ #include "fsfloaterplacedetails.h" #include "fscommon.h" #include "rlvactions.h" +#include "rlvhandler.h" // Constants static const F32 PLACE_INFO_UPDATE_INTERVAL = 3.0; @@ -1395,6 +1396,7 @@ void LLPanelPlaces::updateVerbs() mCloseBtn->setVisible(is_create_landmark_visible && !isLandmarkEditModeOn); // FIRE-31033: Keep Teleport/Map/Profile buttons on places floater mPlaceInfoBtn->setVisible(!is_place_info_visible && !is_create_landmark_visible && !isLandmarkEditModeOn && !is_pick_panel_visible); + mShowOnMapBtn->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWWORLDMAP)); bool show_options_btn = is_place_info_visible && !is_create_landmark_visible && !isLandmarkEditModeOn; mOverflowBtn->setVisible(show_options_btn); @@ -1417,13 +1419,18 @@ void LLPanelPlaces::updateVerbs() } // FIRE-9536: Teleport button disabled if standalone TP history & sidepanel TP history detail //else if (mPlaceInfoType == LANDMARK_INFO_TYPE || mPlaceInfoType == REMOTE_PLACE_INFO_TYPE) - else if (mPlaceInfoType == LANDMARK_INFO_TYPE || mPlaceInfoType == REMOTE_PLACE_INFO_TYPE || mPlaceInfoType == TELEPORT_HISTORY_INFO_TYPE) + //{ + // mTeleportBtn->setEnabled(have_3d_pos); + //} + else if (mPlaceInfoType == LANDMARK_INFO_TYPE) { - // FIRE-21863: TP restrictions can be circumvented via parcel SLURL - //mTeleportBtn->setEnabled(have_3d_pos); - mTeleportBtn->setEnabled(have_3d_pos && RlvActions::canTeleportToLocation()); - // + mTeleportBtn->setEnabled(have_3d_pos && !gRlvHandler.hasBehaviour(RLV_BHVR_TPLM)); } + else if (mPlaceInfoType == REMOTE_PLACE_INFO_TYPE || mPlaceInfoType == TELEPORT_HISTORY_INFO_TYPE) + { + mTeleportBtn->setEnabled(have_3d_pos && RlvActions::canTeleportToLocation()); + } + // } else { diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index a5dbb5a212..f7426e93b2 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -50,6 +50,8 @@ #include // #include "llviewercontrol.h" +#include "rlvactions.h" +#include "rlvhandler.h" #include "fsfloaterplacedetails.h" @@ -673,9 +675,9 @@ void LLTeleportHistoryPanel::updateVerbs() LLTeleportHistoryFlatItem* itemp = dynamic_cast (mLastSelectedFlatlList->getSelectedItem()); - mTeleportBtn->setEnabled(NULL != itemp); + mTeleportBtn->setEnabled(NULL != itemp && RlvActions::canTeleportToLocation()); mShowProfile->setEnabled(NULL != itemp); - mShowOnMapBtn->setEnabled(NULL != itemp); + mShowOnMapBtn->setEnabled(NULL != itemp && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWWORLDMAP)); // } @@ -1318,6 +1320,17 @@ bool LLTeleportHistoryPanel::isActionEnabled(const LLSD& userdata) const return false; } LLTeleportHistoryFlatItem* itemp = dynamic_cast (mLastSelectedFlatlList->getSelectedItem()); + // RLVa fix + if ("teleport" == command_name) + { + return itemp && RlvActions::canTeleportToLocation(); + } + else if ("show_on_map" == command_name) + { + return itemp && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWWORLDMAP); + } + // + return itemp != NULL; }