summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorymodel.cpp
diff options
context:
space:
mode:
authorRichard Nelson <richard@lindenlab.com>2007-02-17 03:02:16 +0000
committerRichard Nelson <richard@lindenlab.com>2007-02-17 03:02:16 +0000
commit73bc0fb42b5bcd80030d9f30d5cb57ec2397ba08 (patch)
treee7c0b2e22d4719123fd688e49a16b76a084c3f77 /indra/newview/llinventorymodel.cpp
parent12ac04231b8d358e70c830f7958f7efbc0f7c0d1 (diff)
merge -r 56779:58057 /branches/selection_management
Diffstat (limited to 'indra/newview/llinventorymodel.cpp')
-rw-r--r--indra/newview/llinventorymodel.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index bdc57c798d..90455f5902 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -28,6 +28,7 @@
#include "llmutelist.h"
#include "llnotify.h"
#include "llcallbacklist.h"
+#include "llpreview.h"
#include <deque>
//#define DIFF_INVENTORY_FILES
@@ -2295,6 +2296,8 @@ bool LLInventoryModel::messageUpdateCore(LLMessageSystem* msg, bool account, boo
item_array_t items;
update_map_t update;
S32 count = msg->getNumberOfBlocksFast(_PREHASH_InventoryData);
+ bool all_one_folder = true;
+ LLUUID folder_id;
for(S32 i = 0; i < count; ++i)
{
LLPointer<LLViewerInventoryItem> titem = new LLViewerInventoryItem;
@@ -2321,6 +2324,14 @@ bool LLInventoryModel::messageUpdateCore(LLMessageSystem* msg, bool account, boo
{
++update[titem->getParentUUID()];
}
+ if (folder_id.isNull())
+ {
+ folder_id = titem->getParentUUID();
+ }
+ else
+ {
+ all_one_folder = false;
+ }
}
if(account)
{
@@ -2344,6 +2355,18 @@ bool LLInventoryModel::messageUpdateCore(LLMessageSystem* msg, bool account, boo
trash_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH);
if(!gInventory.isObjectDescendentOf(lastitem->getUUID(), trash_id))
{
+ LLMultiPreview* multi_previewp = LLMultiPreview::getAutoOpenInstance(folder_id);
+ if (!multi_previewp && all_one_folder)
+ {
+ S32 left, top;
+ gFloaterView->getNewFloaterPosition(&left, &top);
+
+ multi_previewp = new LLMultiPreview(LLRect(left, top, left + 300, top - 100));
+ LLMultiPreview::setAutoOpenInstance(multi_previewp, folder_id);
+ }
+
+ LLFloater::setFloaterHost(multi_previewp);
+
bool show_keep_discard = lastitem->getPermissions().getCreator() != gAgent.getID();
switch(lastitem->getType())
{
@@ -2374,6 +2397,13 @@ bool LLInventoryModel::messageUpdateCore(LLMessageSystem* msg, bool account, boo
default:
break;
}
+
+ LLFloater::setFloaterHost(NULL);
+ if (multi_previewp)
+ {
+ multi_previewp->open();
+ }
+
LLInventoryView* view = LLInventoryView::getActiveInventory();
if(view)
{