SL-20566 Allow removal of a teleport history locations
parent
8262c4201e
commit
e4b9cbcdd3
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue