From 5d4959e3a107a6a40014528dd8e17e46bf128540 Mon Sep 17 00:00:00 2001 From: angela Date: Fri, 4 Dec 2009 22:25:12 +0800 Subject: EXT-2827 Unable to delete object when select face of object --- indra/newview/llselectmgr.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'indra/newview/llselectmgr.cpp') 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(this)->mSelectedObjects->getFirstDeleteableObject() ; // HACK: casting away constness - MG // Note: Can only delete root objects (see getFirstDeleteableObject() for more info) - return const_cast(this)->mSelectedObjects->getFirstDeleteableObject() != NULL; // HACK: casting away constness - MG + if (obj!= NULL) + { + // all the faces needs to be selected + if(const_cast(this)->mSelectedObjects->contains(obj,SELECT_ALL_TES )) + { + can_delete = true; + } + } + + return can_delete; } //----------------------------------------------------------------------------- -- cgit v1.2.3