summaryrefslogtreecommitdiff
path: root/indra/newview/llavataractions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llavataractions.cpp')
-rw-r--r--indra/newview/llavataractions.cpp29
1 files changed, 23 insertions, 6 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 2dafe295fe..752a2e7504 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -60,6 +60,7 @@
#include "llimview.h" // for gIMMgr
#include "llmutelist.h"
#include "llnotificationsutil.h" // for LLNotificationsUtil
+#include "llpaneloutfitedit.h"
#include "llrecentpeople.h"
#include "llsidetray.h"
#include "lltrans.h"
@@ -436,12 +437,28 @@ namespace action_give_inventory
typedef std::set<LLUUID> uuid_set_t;
/**
+ * Returns a pointer to 'Add More' inventory panel of Edit Outfit SP.
+ */
+ static LLInventoryPanel* get_outfit_editor_inventory_panel()
+ {
+ LLPanelOutfitEdit* panel_outfit_edit = dynamic_cast<LLPanelOutfitEdit*>(LLSideTray::getInstance()->getPanel("panel_outfit_edit"));
+ if (NULL == panel_outfit_edit) return NULL;
+
+ LLInventoryPanel* inventory_panel = panel_outfit_edit->findChild<LLInventoryPanel>("folder_view");
+ return inventory_panel;
+ }
+
+ /**
* Checks My Inventory visibility.
*/
static bool is_give_inventory_acceptable()
{
LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
- if (NULL == active_panel) return false;
+ if (!active_panel)
+ {
+ active_panel = get_outfit_editor_inventory_panel();
+ if (!active_panel) return false;
+ }
// check selection in the panel
const uuid_set_t inventory_selected_uuids = active_panel->getRootFolder()->getSelectionList();
@@ -550,11 +567,10 @@ namespace action_give_inventory
// iterate through avatars
for(S32 i = 0; i < count; ++i)
{
- const std::string& avatar_name = LLShareInfo::instance().mAvatarNames[i];
const LLUUID& avatar_uuid = LLShareInfo::instance().mAvatarUuids[i];
- // Start up IM before give the item
- const LLUUID session_id = gIMMgr->addSession(avatar_name, IM_NOTHING_SPECIAL, avatar_uuid);
+ // We souldn't open IM session, just calculate session ID for logging purpose. See EXT-6710
+ const LLUUID session_id = gIMMgr->computeSessionID(IM_NOTHING_SPECIAL, avatar_uuid);
uuid_set_t::const_iterator it = inventory_selected_uuids.begin();
const uuid_set_t::const_iterator it_end = inventory_selected_uuids.end();
@@ -622,9 +638,10 @@ namespace action_give_inventory
LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
- if (NULL == active_panel)
+ if (!active_panel)
{
- return;
+ active_panel = get_outfit_editor_inventory_panel();
+ if (!active_panel) return;
}
const uuid_set_t inventory_selected_uuids = active_panel->getRootFolder()->getSelectionList();