summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2018-03-07 11:27:43 -0800
committerRider Linden <rider@lindenlab.com>2018-03-07 11:27:43 -0800
commit7b56db31f91545102744885b4f70c93278e837bd (patch)
tree97bd880e3aeb1f60d667344e6693b46c8ba120eb /indra/newview/llinventorybridge.cpp
parent4235231b5adbb7f064cab732f761dd359ef4b648 (diff)
parentf8c76535a35aaf245e261357a59e977bac5b2501 (diff)
Merge
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r--indra/newview/llinventorybridge.cpp40
1 files changed, 35 insertions, 5 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 9da987daff..fbc35e9192 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -43,6 +43,7 @@
#include "llfloatermarketplacelistings.h"
#include "llfloateroutfitphotopreview.h"
#include "llfloatersidepanelcontainer.h"
+#include "llsidepanelinventory.h"
#include "llfloaterworldmap.h"
#include "llfolderview.h"
#include "llfriendcard.h"
@@ -1836,11 +1837,24 @@ void LLItemBridge::gotoItem()
LLInventoryObject *obj = getInventoryObject();
if (obj && obj->getIsLinkType())
{
- LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel();
- if (active_panel)
+ const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX);
+ if (gInventory.isObjectDescendentOf(obj->getLinkedUUID(), inbox_id))
{
- active_panel->setSelection(obj->getLinkedUUID(), TAKE_FOCUS_NO);
+ 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);
+ }
}
+
}
}
@@ -2207,8 +2221,24 @@ std::string LLFolderBridge::getLabelSuffix() const
{
return llformat(" ( %s ) ", LLTrans::getString("LoadingData").c_str());
}
-
- return LLInvFVBridge::getLabelSuffix();
+ std::string suffix = "";
+ if(mShowDescendantsCount)
+ {
+ LLInventoryModel::cat_array_t cat_array;
+ LLInventoryModel::item_array_t item_array;
+ gInventory.collectDescendents(getUUID(), cat_array, item_array, TRUE);
+ S32 count = item_array.size();
+ if(count > 0)
+ {
+ std::ostringstream oss;
+ oss << count;
+ LLStringUtil::format_map_t args;
+ args["[ITEMS_COUNT]"] = oss.str();
+ suffix = " " + LLTrans::getString("InventoryItemsCount", args);
+ }
+ }
+
+ return LLInvFVBridge::getLabelSuffix() + suffix;
}
LLFontGL::StyleFlags LLFolderBridge::getLabelStyle() const