summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelobjectinventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelobjectinventory.cpp')
-rw-r--r--indra/newview/llpanelobjectinventory.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index 43366ef814..5ddbdf7f01 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -117,7 +117,7 @@ public:
virtual BOOL isItemRenameable() const;
virtual BOOL renameItem(const std::string& new_name);
virtual BOOL isItemMovable() const;
- virtual BOOL isItemRemovable();
+ virtual BOOL isItemRemovable() const;
virtual BOOL removeItem();
virtual void removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batch);
virtual void move(LLFolderViewEventListener* parent_listener);
@@ -412,9 +412,9 @@ BOOL LLTaskInvFVBridge::isItemMovable() const
return TRUE;
}
-BOOL LLTaskInvFVBridge::isItemRemovable()
+BOOL LLTaskInvFVBridge::isItemRemovable() const
{
- LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
+ const LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
if(object
&& (object->permModify() || object->permYouOwner()))
{
@@ -445,7 +445,7 @@ bool remove_task_inventory_callback(const LLSD& notification, const LLSD& respon
}
// helper for remove
-// ! REFACTOR ! two_uuids_list_t is also defined in llinevntorybridge.h, but differently.
+// ! REFACTOR ! two_uuids_list_t is also defined in llinventorybridge.h, but differently.
typedef std::pair<LLUUID, std::list<LLUUID> > panel_two_uuids_list_t;
typedef std::pair<LLPanelObjectInventory*, panel_two_uuids_list_t> remove_data_t;
BOOL LLTaskInvFVBridge::removeItem()
@@ -463,10 +463,6 @@ BOOL LLTaskInvFVBridge::removeItem()
}
else
{
- remove_data_t* data = new remove_data_t;
- data->first = mPanel;
- data->second.first = mPanel->getTaskUUID();
- data->second.second.push_back(mUUID);
LLSD payload;
payload["task_id"] = mPanel->getTaskUUID();
payload["inventory_ids"].append(mUUID);
@@ -714,7 +710,7 @@ public:
virtual BOOL isItemRenameable() const;
// virtual BOOL isItemCopyable() const { return FALSE; }
virtual BOOL renameItem(const std::string& new_name);
- virtual BOOL isItemRemovable();
+ virtual BOOL isItemRemovable() const;
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
virtual BOOL hasChildren() const;
virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const;
@@ -746,7 +742,7 @@ BOOL LLTaskCategoryBridge::renameItem(const std::string& new_name)
return FALSE;
}
-BOOL LLTaskCategoryBridge::isItemRemovable()
+BOOL LLTaskCategoryBridge::isItemRemovable() const
{
return FALSE;
}
@@ -1572,7 +1568,7 @@ void LLPanelObjectInventory::reset()
{
clearContents();
- setBorderVisible(FALSE);
+ //setBorderVisible(FALSE);
mCommitCallbackRegistrar.pushScope(); // push local callbacks
@@ -1587,10 +1583,16 @@ void LLPanelObjectInventory::reset()
mFolders->getFilter()->setShowFolderState(LLInventoryFilter::SHOW_ALL_FOLDERS);
mFolders->setCallbackRegistrar(&mCommitCallbackRegistrar);
+ if (hasFocus())
+ {
+ LLEditMenuHandler::gEditMenuHandler = mFolders;
+ }
+
LLRect scroller_rect(0, getRect().getHeight(), getRect().getWidth(), 0);
LLScrollContainer::Params scroll_p;
scroll_p.name("task inventory scroller");
scroll_p.rect(scroller_rect);
+ scroll_p.tab_stop(true);
scroll_p.follows.flags(FOLLOWS_ALL);
mScroller = LLUICtrlFactory::create<LLScrollContainer>(scroll_p);
addChild(mScroller);