diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-11-06 23:15:16 +0200 |
---|---|---|
committer | akleshchev <117672381+akleshchev@users.noreply.github.com> | 2023-11-07 19:13:20 +0200 |
commit | e4b9cbcdd3195b9841864463ea6ca8c02105a06d (patch) | |
tree | a64d2e1ac4a65920406c92a31c4c002eeb714036 /indra | |
parent | 8262c4201ec2ce2781d917e73597a00c779a7658 (diff) |
SL-20566 Allow removal of a teleport history locations
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llpanelteleporthistory.cpp | 9 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_teleport_history_item.xml | 13 |
2 files changed, 21 insertions, 1 deletions
diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index b938b30479..3ed444a5af 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -1067,6 +1067,12 @@ void LLTeleportHistoryPanel::onGearMenuAction(const LLSD& userdata) LLLandmarkActions::getSLURLfromPosGlobal(globalPos, boost::bind(&LLTeleportHistoryPanel::gotSLURLCallback, _1)); } + else if ("remove" == command_name) + { + LLTeleportHistoryStorage::getInstance()->removeItem(index); + LLTeleportHistoryStorage::getInstance()->save(); + showTeleportHistory(); + } } bool LLTeleportHistoryPanel::isActionEnabled(const LLSD& userdata) const @@ -1121,7 +1127,8 @@ bool LLTeleportHistoryPanel::isActionEnabled(const LLSD& userdata) const if ("teleport" == command_name || "view" == command_name || "show_on_map" == command_name - || "copy_slurl" == command_name) + || "copy_slurl" == command_name + || "remove" == command_name) { if (!mLastSelectedFlatlList) { diff --git a/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml b/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml index 153e5a70a9..9bbfdd4291 100644 --- a/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml +++ b/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml @@ -49,4 +49,17 @@ function="TeleportHistory.GearMenu.Enable" parameter="copy_slurl" /> </menu_item_call> + <menu_item_separator + layout="topleft" /> + <menu_item_call + label="Remove from history" + layout="topleft" + name="remove_from_history"> + <on_click + function="TeleportHistory.GearMenu.Action" + parameter="remove" /> + <on_enable + function="TeleportHistory.GearMenu.Enable" + parameter="remove" /> + </menu_item_call> </toggleable_menu> |