diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 6aa5c53194f5573a2d2391f2fdd82547fca34b38..58962b67d66ca22faad0d0d5cfd3a59db417b3d9 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -46,7 +46,8 @@ static LLRegisterPanelClassWrapper<LLSidepanelInventory> t_inventory("sidepanel_ LLSidepanelInventory::LLSidepanelInventory() : LLPanel(), - mItemPanel(NULL) + mItemPanel(NULL), + mPanelMainInventory(NULL) { //LLUICtrlFactory::getInstance()->buildPanel(this, "panel_inventory.xml"); // Called from LLRegisterPanelClass::defaultPanelClassBuilder() @@ -80,8 +81,8 @@ BOOL LLSidepanelInventory::postBuild() mOverflowBtn = mInventoryPanel->getChild<LLButton>("overflow_btn"); mOverflowBtn->setClickedCallback(boost::bind(&LLSidepanelInventory::onOverflowButtonClicked, this)); - LLPanelMainInventory *panel_main_inventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory"); - panel_main_inventory->setSelectCallback(boost::bind(&LLSidepanelInventory::onSelectionChange, this, _1, _2)); + mPanelMainInventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory"); + mPanelMainInventory->setSelectCallback(boost::bind(&LLSidepanelInventory::onSelectionChange, this, _1, _2)); } // UI elements from item panel @@ -127,6 +128,10 @@ void LLSidepanelInventory::onOpen(const LLSD& key) mTaskPanel->setObjectSelection(LLSelectMgr::getInstance()->getSelection()); showTaskInfoPanel(); } + if (key.has("select")) + { + mPanelMainInventory->getPanel()->setSelection(key["select"].asUUID(), TAKE_FOCUS_NO); + } } void LLSidepanelInventory::onInfoButtonClicked() diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h index 681af7fafabc0e418f6f45c95a31f3dfad599acd..9eba77b5c3f6ee80664093e3c2e1fe802f613808 100644 --- a/indra/newview/llsidepanelinventory.h +++ b/indra/newview/llsidepanelinventory.h @@ -68,6 +68,7 @@ class LLSidepanelInventory : public LLPanel LLPanel* mInventoryPanel; // Main inventory view LLSidepanelItemInfo* mItemPanel; // Individual item view LLSidepanelTaskInfo* mTaskPanel; // Individual in-world object view + LLPanelMainInventory* mPanelMainInventory; protected: void onInfoButtonClicked(); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index ef6a621323b6c15361ca8644c9db22e003a4336a..11b2f07f1bd514e8eb386785fa28deabc8263376 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -939,6 +939,11 @@ void open_offer(const std::vector<LLUUID>& items, const std::string& from_name) !from_name.empty()) { view = LLFloaterInventory::showAgentInventory(); + //TODO:this should be moved to the end of method after all the checks, + //but first decide what to do with active inventory if any (EK) + LLSD key; + key["select"] = item->getUUID(); + LLSideTray::getInstance()->showPanel("sidepanel_inventory", key); } else {