summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2021-06-25 00:52:03 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2021-06-25 00:52:03 +0300
commit293272c2c7e2758fc27ce386e88bc494e62c9f3d (patch)
tree1ba6a0e13c8a9b07581df8a2f83e9963c22c22f2 /indra/newview/llinventorybridge.cpp
parentded1f85b2811a51c61b140be6862ba479c02b5a8 (diff)
parent467d8339c970c253dada2cf0e1eed45be66593ac (diff)
Merge branch 'master' into DRTVWR-521-maint
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r--indra/newview/llinventorybridge.cpp63
1 files changed, 24 insertions, 39 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 4567388166..9b5be70d86 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -1835,28 +1835,11 @@ void LLItemBridge::restoreToWorld()
void LLItemBridge::gotoItem()
{
- LLInventoryObject *obj = getInventoryObject();
- if (obj && obj->getIsLinkType())
- {
- const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX);
- if (gInventory.isObjectDescendentOf(obj->getLinkedUUID(), inbox_id))
- {
- LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
- if (sidepanel_inventory && sidepanel_inventory->getInboxPanel())
- {
- sidepanel_inventory->getInboxPanel()->setSelection(obj->getLinkedUUID(), TAKE_FOCUS_NO);
- }
- }
- else
- {
- LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel();
- if (active_panel)
- {
- active_panel->setSelection(obj->getLinkedUUID(), TAKE_FOCUS_NO);
- }
- }
-
- }
+ LLInventoryObject *obj = getInventoryObject();
+ if (obj && obj->getIsLinkType())
+ {
+ show_item_original(obj->getUUID());
+ }
}
LLUIImagePtr LLItemBridge::getIcon() const
@@ -4101,6 +4084,12 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
items.push_back(std::string("New Body Parts"));
items.push_back(std::string("New Settings"));
items.push_back(std::string("upload_def"));
+
+ if (!LLEnvironment::instance().isInventoryEnabled())
+ {
+ disabled_items.push_back("New Settings");
+ }
+
}
}
getClipboardEntries(false, items, disabled_items, flags);
@@ -7063,8 +7052,8 @@ void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action
if (!item)
return;
LLUUID asset_id = item->getAssetUUID();
- LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, asset_id);
- LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
+ LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, asset_id, LLEnvironment::TRANSITION_INSTANT);
+ LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::TRANSITION_INSTANT);
}
else if ("apply_settings_parcel" == action)
{
@@ -7238,21 +7227,17 @@ void LLLinkFolderBridge::performAction(LLInventoryModel* model, std::string acti
}
void LLLinkFolderBridge::gotoItem()
{
- const LLUUID &cat_uuid = getFolderID();
- if (!cat_uuid.isNull())
- {
- LLFolderViewItem *base_folder = mInventoryPanel.get()->getItemByID(cat_uuid);
- if (base_folder)
- {
- if (LLInventoryModel* model = getInventoryModel())
- {
- model->fetchDescendentsOf(cat_uuid);
- }
- base_folder->setOpen(TRUE);
- mRoot->setSelection(base_folder,TRUE);
- mRoot->scrollToShowSelection();
- }
- }
+ LLItemBridge::gotoItem();
+
+ const LLUUID &cat_uuid = getFolderID();
+ if (!cat_uuid.isNull())
+ {
+ LLFolderViewItem *base_folder = LLInventoryPanel::getActiveInventoryPanel()->getItemByID(cat_uuid);
+ if (base_folder)
+ {
+ base_folder->setOpen(TRUE);
+ }
+ }
}
const LLUUID &LLLinkFolderBridge::getFolderID() const
{