summaryrefslogtreecommitdiff
path: root/indra/newview/llselectmgr.cpp
diff options
context:
space:
mode:
authorangela <angela@lindenlab.com>2009-12-04 22:25:12 +0800
committerangela <angela@lindenlab.com>2009-12-04 22:25:12 +0800
commit5d4959e3a107a6a40014528dd8e17e46bf128540 (patch)
tree62aa78843edeaca0d0076d8f59dd207088bde264 /indra/newview/llselectmgr.cpp
parent87c6a2964325f7771cf03f6f7e82253a132c0e6d (diff)
EXT-2827 Unable to delete object when select face of object
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;
}
//-----------------------------------------------------------------------------