From 4c0f6f5825bdd833d0bad05bf431c29acba45ae0 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Fri, 25 Jan 2019 18:26:42 +0200 Subject: SL-10194 Selecting mesh face doesn't highlight the face in any way - Fixed according to Steeltoe notes. - Add const modifier for some methods --- indra/newview/llselectmgr.cpp | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'indra/newview/llselectmgr.cpp') diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 9c6be001f6..b36df244f8 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -5869,6 +5869,9 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) if (!objectp) continue; + if(getTEMode() && !node->hasSelectedTE()) + continue; + if (objectp->mDrawable && objectp->mDrawable->getVOVolume() && objectp->mDrawable->getVOVolume()->isMesh()) @@ -5876,11 +5879,18 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) S32 num_tes = llmin((S32)objectp->getNumTEs(), (S32)objectp->getNumFaces()); // avatars have TEs but no faces for (S32 te = 0; te < num_tes; ++te) { - bool bSelected = node->isTESelected(te) && getTEMode(); - - objectp->mDrawable->getFace(te)->renderOneWireframe( - !bSelected ? LLColor4(sSilhouetteParentColor[VRED], sSilhouetteParentColor[VGREEN], sSilhouetteParentColor[VBLUE], LLSelectMgr::sHighlightAlpha * 2) : sHighlightInspectColor - , fogCfx, bSelected, wireframe_selection, node->isTransient() ? FALSE : LLSelectMgr::sRenderHiddenSelections); + if (!getTEMode()) + { + objectp->mDrawable->getFace(te)->renderOneWireframe( + LLColor4(sSilhouetteParentColor[VRED], sSilhouetteParentColor[VGREEN], sSilhouetteParentColor[VBLUE], LLSelectMgr::sHighlightAlpha * 2) + , fogCfx, wireframe_selection, node->isTransient() ? FALSE : LLSelectMgr::sRenderHiddenSelections); + } + else if(node->isTESelected(te)) + { + objectp->mDrawable->getFace(te)->renderOneWireframe( + LLColor4(sSilhouetteParentColor[VRED], sSilhouetteParentColor[VGREEN], sSilhouetteParentColor[VBLUE], LLSelectMgr::sHighlightAlpha * 2) + , fogCfx, wireframe_selection, node->isTransient() ? FALSE : LLSelectMgr::sRenderHiddenSelections); + } } } else @@ -6078,7 +6088,7 @@ void LLSelectNode::selectTE(S32 te_index, BOOL selected) mLastTESelected = te_index; } -BOOL LLSelectNode::isTESelected(S32 te_index) +BOOL LLSelectNode::isTESelected(S32 te_index) const { if (te_index < 0 || te_index >= mObject->getNumTEs()) { @@ -6087,7 +6097,7 @@ BOOL LLSelectNode::isTESelected(S32 te_index) return (mTESelectMask & (0x1 << te_index)) != 0; } -S32 LLSelectNode::getLastSelectedTE() +S32 LLSelectNode::getLastSelectedTE() const { if (!isTESelected(mLastTESelected)) { @@ -6096,11 +6106,6 @@ S32 LLSelectNode::getLastSelectedTE() return mLastTESelected; } -S32 LLSelectNode::getLastOperatedTE() -{ - return mLastTESelected; -} - LLViewerObject* LLSelectNode::getObject() { if (!mObject) -- cgit v1.2.3