diff options
| author | Dave Parks <davep@lindenlab.com> | 2022-12-02 09:56:56 -0600 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2022-12-02 09:56:56 -0600 |
| commit | 1a8a40c94493ec3598010db53c4bf21108b6e272 (patch) | |
| tree | 05ac839c8fa5bc967517372f04ea8ce934a3447e /indra/newview/lltexturectrl.cpp | |
| parent | ed2b768da29f8dc4f96b463fe4d4087deab75a37 (diff) | |
| parent | 3812fb0f41723ea359ecffaefa2ca10e83ae679f (diff) | |
Merge branch 'DRTVWR-559' of github.com:secondlife/viewer into DRTVWR-559
Diffstat (limited to 'indra/newview/lltexturectrl.cpp')
| -rw-r--r-- | indra/newview/lltexturectrl.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 9891d7b078..6cf7e8850d 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -1800,7 +1800,7 @@ BOOL LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, allow_dnd = is_texture || is_mesh || is_material; } - if (getEnabled() && allow_dnd && allowDrop(item)) + if (getEnabled() && allow_dnd && allowDrop(item, cargo_type, tooltip_msg)) { if (drop) { @@ -1952,7 +1952,7 @@ void LLTextureCtrl::draw() LLUICtrl::draw(); } -BOOL LLTextureCtrl::allowDrop(LLInventoryItem* item) +BOOL LLTextureCtrl::allowDrop(LLInventoryItem* item, EDragAndDropType cargo_type, std::string& tooltip_msg) { BOOL copy = item->getPermissions().allowCopyBy(gAgent.getID()); BOOL mod = item->getPermissions().allowModifyBy(gAgent.getID()); @@ -1978,6 +1978,12 @@ BOOL LLTextureCtrl::allowDrop(LLInventoryItem* item) } else { + PermissionMask mask = PERM_COPY | PERM_TRANSFER; + if ((filter_perm_mask & mask) == mask + && cargo_type == DAD_TEXTURE) + { + tooltip_msg.assign(LLTrans::getString("TooltipTextureRestrictedDrop")); + } return FALSE; } } |
