RLVa fix: Prevent "Show Original" from circumventing @showinv restriction

master
Ansariel 2021-11-29 09:56:58 +01:00
parent ba61222cd9
commit 36e0b1a4e1
3 changed files with 14 additions and 0 deletions

View File

@ -89,6 +89,7 @@
#include "llwearablelist.h"
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
#include "rlvactions.h"
#include "rlvhandler.h"
#include "rlvlocks.h"
// [/RLVa:KB]
@ -885,6 +886,13 @@ void show_item_profile(const LLUUID& item_uuid)
void show_item_original(const LLUUID& item_uuid)
{
// <FS:Ansariel> Don't show if @showinv=n
if (rlv_handler_t::isEnabled() && gRlvHandler.hasBehaviour(RLV_BHVR_SHOWINV))
{
return;
}
// </FS:Ansariel>
LLFloater* floater_inventory = LLFloaterReg::getInstance("inventory");
if (!floater_inventory)
{

View File

@ -87,6 +87,9 @@
name="show_original">
<on_click
function="Wearable.ShowOriginal" />
<on_enable
function="RLV.EnableIfNot"
parameter="showinv"/>
</menu_item_call>
<menu_item_call
label="Create New"

View File

@ -47,6 +47,9 @@
name="show_original">
<on_click
function="Wearing.ShowOriginal" />
<on_enable
function="RLV.EnableIfNot"
parameter="showinv"/>
</menu_item_call>
<menu_item_call
label="Edit Outfit"