summaryrefslogtreecommitdiff
path: root/indra/newview/llselectmgr.cpp
diff options
context:
space:
mode:
authorruslantproductengine <ruslantproductengine@lindenlab.com>2019-01-25 18:26:42 +0200
committerruslantproductengine <ruslantproductengine@lindenlab.com>2019-01-25 18:26:42 +0200
commit4c0f6f5825bdd833d0bad05bf431c29acba45ae0 (patch)
tree8d324e23ffab2754994316ece97dc9df6fc884e1 /indra/newview/llselectmgr.cpp
parent60b4c6405b8adb2a12f53ed403731f948cb3937f (diff)
SL-10194 Selecting mesh face doesn't highlight the face in any way
- Fixed according to Steeltoe notes. - Add const modifier for some methods
Diffstat (limited to 'indra/newview/llselectmgr.cpp')
-rw-r--r--indra/newview/llselectmgr.cpp29
1 files changed, 17 insertions, 12 deletions
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)