diff options
author | Ansariel <none@none> | 2017-04-27 19:19:11 +0200 |
---|---|---|
committer | Ansariel <none@none> | 2017-04-27 19:19:11 +0200 |
commit | b59ac959fcf2f1f0435f965d2c7279f529f1ce5c (patch) | |
tree | dc3383bbb92181483baae1394c93e7fcda534d4b /indra/newview/llinventoryfunctions.cpp | |
parent | d65e6e83821bf134805282e5c2ff66f76c819fe6 (diff) |
MAINT-6519 Contribution, adds feature to replace inventory links
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rw-r--r-- | indra/newview/llinventoryfunctions.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index f04d6cc753..bccc654fbf 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -2306,6 +2306,26 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root // Clear the clipboard before we start adding things on it LLClipboard::instance().reset(); } + if ("replace_links" == action) + { + LLSD params; + if (root->getSelectedCount() == 1) + { + LLFolderViewItem* folder_item = root->getSelectedItems().front(); + LLInvFVBridge* bridge = (LLInvFVBridge*)folder_item->getViewModelItem(); + + if (bridge) + { + LLInventoryObject* obj = bridge->getInventoryObject(); + if (obj && obj->getType() != LLAssetType::AT_CATEGORY && obj->getActualType() != LLAssetType::AT_LINK_FOLDER) + { + params = LLSD(obj->getUUID()); + } + } + } + LLFloaterReg::showInstance("linkreplace", params); + return; + } static const std::string change_folder_string = "change_folder_type_"; if (action.length() > change_folder_string.length() && |