summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturectrl.cpp
diff options
context:
space:
mode:
authorJonathan Yap <jhwelch@gmail.com>2018-01-12 09:08:49 -0500
committerJonathan Yap <jhwelch@gmail.com>2018-01-12 09:08:49 -0500
commit1e586749efeeb8c40503330572680a8709ae5487 (patch)
tree5c1ebee5dbdb5004f354b9fb0837d60f6dd3cfcc /indra/newview/lltexturectrl.cpp
parent32f16633c77564d567ed0752e56eb38abb916ccd (diff)
parent1693ccba58eef676df1f91e50627545ac35bb819 (diff)
STORM-2145 Merge up to viewer-release
Diffstat (limited to 'indra/newview/lltexturectrl.cpp')
-rw-r--r--indra/newview/lltexturectrl.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index 24bc55c998..c7adaa908f 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -43,7 +43,6 @@
#include "llinventorymodelbackgroundfetch.h"
#include "llinventoryobserver.h"
#include "llinventorypanel.h"
-#include "llfloaterinventory.h"
#include "lllineeditor.h"
#include "llui.h"
#include "llviewerinventory.h"
@@ -565,7 +564,7 @@ void LLFloaterTexturePicker::draw()
}
}
-const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, BOOL copyable_only)
+const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, BOOL copyable_only, BOOL ignore_library)
{
LLViewerInventoryCategory::cat_array_t cats;
LLViewerInventoryItem::item_array_t items;
@@ -585,7 +584,10 @@ const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, BOOL co
LLPermissions item_permissions = itemp->getPermissions();
if (item_permissions.allowCopyBy(gAgent.getID(), gAgent.getGroupID()))
{
- return itemp->getUUID();
+ if(!ignore_library || !gInventory.isObjectDescendentOf(itemp->getUUID(),gInventory.getLibraryRootFolderID()))
+ {
+ return itemp->getUUID();
+ }
}
}
// otherwise just return first instance, unless copyable requested
@@ -595,7 +597,10 @@ const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, BOOL co
}
else
{
- return items[0]->getUUID();
+ if(!ignore_library || !gInventory.isObjectDescendentOf(items[0]->getUUID(),gInventory.getLibraryRootFolderID()))
+ {
+ return items[0]->getUUID();
+ }
}
}