From 46b325ff6d77ba778256d28a9317b2402967d6d7 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@bred.dog>
Date: Sat, 17 Aug 2019 17:10:03 -0400
Subject: [PATCH] Don't set highlight channel unless we have a selected face

---
 indra/newview/pipeline.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 3436bb926d..cf716953b8 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -3884,8 +3884,6 @@ void LLPipeline::postSort(LLCamera& camera)
 	{
 		mSelectedFaces.clear();
 
-		LLPipeline::setRenderHighlightTextureChannel(gFloaterTools->getPanelFace()->getTextureChannelToEdit());
-
 		// Draw face highlights for selected faces.
 		if (LLSelectMgr::getInstance()->getTEMode())
 		{
@@ -3904,6 +3902,11 @@ void LLPipeline::postSort(LLCamera& camera)
 					return true;
 				}
 			} func;
+
+			if (!mSelectedFaces.empty())
+			{
+				LLPipeline::setRenderHighlightTextureChannel(gFloaterTools->getPanelFace()->getTextureChannelToEdit());
+			}
 			LLSelectMgr::getInstance()->getSelection()->applyToTEs(&func);
 		}
 	}
-- 
GitLab