summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llinventorypanel.cpp29
-rwxr-xr-xindra/newview/llpanelpicks.cpp12
2 files changed, 27 insertions, 14 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index f4e6d32510..acbec531b6 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -1152,27 +1152,34 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L
LL_DEBUGS("Messaging") << "Highlighting" << obj_id << LL_ENDL;
LLViewerInventoryItem * item = gInventory.getItem(obj_id);
+ LLViewerInventoryCategory * cat = gInventory.getCategory(obj_id);
- bool item_in_inbox = false;
- bool item_in_outbox = false;
+ bool in_inbox = false;
+ bool in_outbox = false;
+
+ LLViewerInventoryCategory * parent_cat = NULL;
if (item)
{
- LLViewerInventoryCategory * cat = gInventory.getCategory(item->getParentUUID());
-
- if (cat)
- {
- item_in_inbox = (LLFolderType::FT_INBOX == cat->getPreferredType());
- item_in_outbox = (LLFolderType::FT_OUTBOX == cat->getPreferredType());
- }
+ parent_cat = gInventory.getCategory(item->getParentUUID());
+ }
+ else if (cat)
+ {
+ parent_cat = gInventory.getCategory(cat->getParentUUID());
+ }
+
+ if (parent_cat)
+ {
+ in_inbox = (LLFolderType::FT_INBOX == parent_cat->getPreferredType());
+ in_outbox = (LLFolderType::FT_OUTBOX == parent_cat->getPreferredType());
}
- if (item_in_inbox || item_in_outbox)
+ if (in_inbox || in_outbox)
{
LLSidepanelInventory * sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
LLInventoryPanel * inventory_panel = NULL;
- if (item_in_inbox)
+ if (in_inbox)
{
sidepanel_inventory->openInbox();
inventory_panel = sidepanel_inventory->getInboxPanel();
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index 04e78e04e3..b6c9f825df 100755
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -134,7 +134,10 @@ public:
LLFloater* picks_floater = LLFloaterReg::showInstance("picks");
LLPanelPicks* picks = picks_floater->findChild<LLPanelPicks>("panel_picks");
- picks->createNewPick();
+ if (picks)
+ {
+ picks->createNewPick();
+ }
}
void editPick(LLPickData* pick_info)
@@ -251,7 +254,10 @@ public:
LLFloater* picks_floater = LLFloaterReg::showInstance("picks");
LLPanelPicks* picks = picks_floater->findChild<LLPanelPicks>("panel_picks");
- picks->createNewClassified();
+ if (picks)
+ {
+ picks->createNewClassified();
+ }
}
void openClassified(LLAvatarClassifiedInfo* c_info)
@@ -269,7 +275,7 @@ public:
params["classified_name"] = c_info->name;
params["classified_desc"] = c_info->description;
params["from_search"] = true;
- LLFloaterSidePanelContainer::showPanel("people", "panel_profile_view", params);
+ LLFloaterSidePanelContainer::showPanel("picks", params);
}
else if (mRequestVerb == "edit")
{