summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llfolderview.cpp1
-rw-r--r--indra/newview/llfolderviewitem.h2
-rw-r--r--indra/newview/llinventorypanel.cpp5
-rw-r--r--indra/newview/llpanellandmarks.cpp2
-rw-r--r--indra/newview/llpanelobjectinventory.cpp59
5 files changed, 36 insertions, 33 deletions
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 260693ebc7..bfc4fcaec6 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -274,6 +274,7 @@ LLFolderView::LLFolderView(const Params& p)
menu->setBackgroundColor(LLUIColorTable::instance().getColor("MenuPopupBgColor"));
mPopupMenuHandle = menu->getHandle();
+ mListener->openItem();
}
// Destroys the object
diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h
index 7d640adf2e..267dbc9028 100644
--- a/indra/newview/llfolderviewitem.h
+++ b/indra/newview/llfolderviewitem.h
@@ -94,7 +94,7 @@ public:
Optional<LLUIImage*> icon_open; // used for folders
Optional<LLUIImage*> icon_overlay; // for links
Optional<LLFolderView*> root;
- Optional<LLFolderViewEventListener*> listener;
+ Mandatory<LLFolderViewEventListener*> listener;
Optional<LLUIImage*> folder_arrow_image;
Optional<S32> folder_indentation; // pixels
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 1ff423056a..49e68402e5 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -463,9 +463,8 @@ void LLInventoryPanel::modelChanged(U32 mask)
// This item already exists in both memory and UI. It was probably reparented.
if (model_item && view_item)
{
- // Don't process the item if it's hanging from the root, since its
- // model_item's parent will be NULL.
- if (view_item->getRoot() != view_item->getParent())
+ // Don't process the item if it is the root
+ if (view_item->getRoot() != view_item)
{
LLFolderViewFolder* new_parent = (LLFolderViewFolder*)mFolderRoot->getItemByID(model_item->getParentUUID());
// Item has been moved.
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index f09f675b75..1595531f7b 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -529,7 +529,7 @@ void LLLandmarksPanel::setParcelID(const LLUUID& parcel_id)
// virtual
void LLLandmarksPanel::setErrorStatus(U32 status, const std::string& reason)
{
- llerrs<< "Can't handle remote parcel request."<< " Http Status: "<< status << ". Reason : "<< reason<<llendl;
+ llwarns << "Can't handle remote parcel request."<< " Http Status: "<< status << ". Reason : "<< reason<<llendl;
}
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index bfe6cab52f..e0d0239929 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -761,7 +761,7 @@ void LLTaskCategoryBridge::openItem()
BOOL LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
{
//llinfos << "LLTaskInvFVBridge::startDrag()" << llendl;
- if(mPanel)
+ if(mPanel && mUUID.notNull())
{
LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
if(object)
@@ -1349,79 +1349,81 @@ LLTaskInvFVBridge* LLTaskInvFVBridge::createObjectBridge(LLPanelObjectInventory*
LLTaskInvFVBridge* new_bridge = NULL;
const LLInventoryItem* item = dynamic_cast<LLInventoryItem*>(object);
const U32 itemflags = ( NULL == item ? 0 : item->getFlags() );
- LLAssetType::EType type = object->getType();
+ LLAssetType::EType type = object ? object->getType() : LLAssetType::AT_CATEGORY;
+ LLUUID object_id = object ? object->getUUID() : LLUUID::null;
+ std::string object_name = object ? object->getName() : std::string();
switch(type)
{
case LLAssetType::AT_TEXTURE:
new_bridge = new LLTaskTextureBridge(panel,
- object->getUUID(),
- object->getName());
+ object_id,
+ object_name);
break;
case LLAssetType::AT_SOUND:
new_bridge = new LLTaskSoundBridge(panel,
- object->getUUID(),
- object->getName());
+ object_id,
+ object_name);
break;
case LLAssetType::AT_LANDMARK:
new_bridge = new LLTaskLandmarkBridge(panel,
- object->getUUID(),
- object->getName());
+ object_id,
+ object_name);
break;
case LLAssetType::AT_CALLINGCARD:
new_bridge = new LLTaskCallingCardBridge(panel,
- object->getUUID(),
- object->getName());
+ object_id,
+ object_name);
break;
case LLAssetType::AT_SCRIPT:
// OLD SCRIPTS DEPRECATED - JC
llwarns << "Old script" << llendl;
//new_bridge = new LLTaskOldScriptBridge(panel,
- // object->getUUID(),
- // object->getName());
+ // object_id,
+ // object_name);
break;
case LLAssetType::AT_OBJECT:
new_bridge = new LLTaskObjectBridge(panel,
- object->getUUID(),
- object->getName(),
+ object_id,
+ object_name,
itemflags);
break;
case LLAssetType::AT_NOTECARD:
new_bridge = new LLTaskNotecardBridge(panel,
- object->getUUID(),
- object->getName());
+ object_id,
+ object_name);
break;
case LLAssetType::AT_ANIMATION:
new_bridge = new LLTaskAnimationBridge(panel,
- object->getUUID(),
- object->getName());
+ object_id,
+ object_name);
break;
case LLAssetType::AT_GESTURE:
new_bridge = new LLTaskGestureBridge(panel,
- object->getUUID(),
- object->getName());
+ object_id,
+ object_name);
break;
case LLAssetType::AT_CLOTHING:
case LLAssetType::AT_BODYPART:
new_bridge = new LLTaskWearableBridge(panel,
- object->getUUID(),
- object->getName(),
+ object_id,
+ object_name,
itemflags);
break;
case LLAssetType::AT_CATEGORY:
new_bridge = new LLTaskCategoryBridge(panel,
- object->getUUID(),
- object->getName());
+ object_id,
+ object_name);
break;
case LLAssetType::AT_LSL_TEXT:
new_bridge = new LLTaskLSLBridge(panel,
- object->getUUID(),
- object->getName());
+ object_id,
+ object_name);
break;
case LLAssetType::AT_MESH:
new_bridge = new LLTaskMeshBridge(panel,
- object->getUUID(),
- object->getName());
+ object_id,
+ object_name);
break;
default:
llinfos << "Unhandled inventory type (llassetstorage.h): "
@@ -1521,6 +1523,7 @@ void LLPanelObjectInventory::reset()
p.task_id = getTaskUUID();
p.parent_panel = this;
p.tool_tip= LLTrans::getString("PanelContentsTooltip");
+ p.listener = LLTaskInvFVBridge::createObjectBridge(this, NULL);
mFolders = LLUICtrlFactory::create<LLFolderView>(p);
// this ensures that we never say "searching..." or "no items found"
mFolders->getFilter()->setShowFolderState(LLInventoryFilter::SHOW_ALL_FOLDERS);