summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorypanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rw-r--r--indra/newview/llinventorypanel.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index e4d1010231..bf12e6a7e0 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -185,6 +185,7 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) :
mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&LLInventoryPanel::beginIMSession, this));
mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, this));
mCommitCallbackRegistrar.add("Inventory.FileUploadLocation", boost::bind(&LLInventoryPanel::fileUploadLocation, this, _2));
+ mCommitCallbackRegistrar.add("Inventory.SetFavoriteFolder", boost::bind(&LLInventoryPanel::setFavoriteFolder, this));
mCommitCallbackRegistrar.add("Inventory.OpenNewFolderWindow", boost::bind(&LLInventoryPanel::openSingleViewInventory, this, LLUUID()));
}
@@ -580,8 +581,8 @@ void LLInventoryPanel::itemChanged(const LLUUID& item_id, U32 mask, const LLInve
if (model_item && view_item && viewmodel_item)
{
const LLUUID& idp = viewmodel_item->getUUID();
- view_item->destroyView();
removeItemID(idp);
+ view_item->destroyView();
}
LLInventoryObject const* objectp = mInventory->getObject(item_id);
@@ -1759,6 +1760,11 @@ void LLInventoryPanel::fileUploadLocation(const LLSD& userdata)
}
}
+void LLInventoryPanel::setFavoriteFolder()
+{
+ gSavedPerAccountSettings.setString("FavoriteFolder", LLFolderBridge::sSelf.get()->getUUID().asString());
+}
+
void LLInventoryPanel::openSingleViewInventory(LLUUID folder_id)
{
LLPanelMainInventory::newFolderWindow(folder_id.isNull() ? LLFolderBridge::sSelf.get()->getUUID() : folder_id);
@@ -2024,7 +2030,7 @@ void LLInventoryPanel::removeItemID(const LLUUID& id)
++it)
{
mItemMap.erase((*it)->getUUID());
-}
+ }
for (LLInventoryModel::item_array_t::iterator it = items.begin(), end_it = items.end();
it != end_it;