summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelplaces.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelplaces.cpp')
-rw-r--r--indra/newview/llpanelplaces.cpp26
1 files changed, 22 insertions, 4 deletions
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index d415b17538..f30bb1a0a6 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -635,21 +635,39 @@ void LLPanelPlaces::onOverflowMenuItemClicked(const LLSD& param)
if (mPickPanel == NULL)
{
- mPickPanel = new LLPanelPick();
+ mPickPanel = LLPanelPickEdit::create();
addChild(mPickPanel);
mPickPanel->setExitCallback(boost::bind(&LLPanelPlaces::togglePickPanel, this, FALSE));
+ mPickPanel->setCancelCallback(boost::bind(&LLPanelPlaces::togglePickPanel, this, FALSE));
+ mPickPanel->setSaveCallback(boost::bind(&LLPanelPlaces::togglePickPanel, this, FALSE));
}
togglePickPanel(TRUE);
+ mPickPanel->onOpen(LLSD());
+ mPlaceInfo->createPick(mPosGlobal, mPickPanel);
LLRect rect = getRect();
mPickPanel->reshape(rect.getWidth(), rect.getHeight());
mPickPanel->setRect(rect);
- mPickPanel->setEditMode(TRUE);
-
- mPlaceInfo->createPick(mPosGlobal, mPickPanel);
}
+ else if (item == "add_to_favbar")
+ {
+ if ( mItem.notNull() )
+ {
+ LLUUID favorites_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_FAVORITE);
+ if ( favorites_id.notNull() )
+ {
+ copy_inventory_item(gAgent.getID(),
+ mItem->getPermissions().getOwner(),
+ mItem->getUUID(),
+ favorites_id,
+ std::string(),
+ LLPointer<LLInventoryCallback>(NULL));
+ llinfos << "Copied inventory item #" << mItem->getUUID() << " to favorites." << llendl;
+ }
+ }
+ }
}
void LLPanelPlaces::onBackButtonClicked()