summaryrefslogtreecommitdiff
path: root/indra/newview/llselectmgr.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-12-07 10:43:53 -0800
committerJames Cook <james@lindenlab.com>2009-12-07 10:43:53 -0800
commit73abaaddd68186dee0c59d37375407a89f77183c (patch)
treec7f7daa35ca0e7cbf9df18648b1a97cecadac80a /indra/newview/llselectmgr.cpp
parent329d5553027c5a1aacae6b01dc57db8f94510b6d (diff)
parent864dd45b2b8dec32552112ed76246c9b0b3f7f0b (diff)
merge
Diffstat (limited to 'indra/newview/llselectmgr.cpp')
-rw-r--r--indra/newview/llselectmgr.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 1605838b94..c8b86118be 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -5753,8 +5753,19 @@ void LLSelectMgr::redo()
//-----------------------------------------------------------------------------
BOOL LLSelectMgr::canDoDelete() const
{
+ bool can_delete = false;
+ LLViewerObject* obj = const_cast<LLSelectMgr*>(this)->mSelectedObjects->getFirstDeleteableObject() ; // HACK: casting away constness - MG
// Note: Can only delete root objects (see getFirstDeleteableObject() for more info)
- return const_cast<LLSelectMgr*>(this)->mSelectedObjects->getFirstDeleteableObject() != NULL; // HACK: casting away constness - MG
+ if (obj!= NULL)
+ {
+ // all the faces needs to be selected
+ if(const_cast<LLSelectMgr*>(this)->mSelectedObjects->contains(obj,SELECT_ALL_TES ))
+ {
+ can_delete = true;
+ }
+ }
+
+ return can_delete;
}
//-----------------------------------------------------------------------------