summaryrefslogtreecommitdiff
path: root/indra/newview/llselectmgr.h
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-07-31 17:35:42 +0100
committerGraham Linden <graham@lindenlab.com>2018-07-31 17:35:42 +0100
commitd748dbce457dabf6bc46eb22c5c5315f50af159c (patch)
tree804a416cf30511e82f12171370bd4da46a64213b /indra/newview/llselectmgr.h
parent60d256e80f019e77afef941bc02eb65be6f9bc6d (diff)
MAINT-8909
Loosen precision when checking rotation and other false negatives when comparing faces to see if they can be considered planar aligned. This was causing fields to be marked tentative (grayed display) incorrectly.
Diffstat (limited to 'indra/newview/llselectmgr.h')
-rw-r--r--indra/newview/llselectmgr.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h
index 25ee8619d7..cbe9200c4e 100644
--- a/indra/newview/llselectmgr.h
+++ b/indra/newview/llselectmgr.h
@@ -124,6 +124,11 @@ template <typename T> struct LLSelectedTEGetFunctor
virtual T get(LLViewerObject* object, S32 te) = 0;
};
+template <typename T> struct LLCheckIdenticalFunctor
+{
+ static bool same(const T& a, const T& b, const T& tolerance);
+};
+
typedef enum e_send_type
{
SEND_ONLY_ROOTS,
@@ -313,7 +318,7 @@ public:
LLViewerObject* getPrimaryObject() { return mPrimaryObject; }
// iterate through texture entries
- template <typename T> bool getSelectedTEValue(LLSelectedTEGetFunctor<T>* func, T& res);
+ template <typename T> bool getSelectedTEValue(LLSelectedTEGetFunctor<T>* func, T& res, bool has_tolerance = false, T tolerance = T());
template <typename T> bool isMultipleTEValue(LLSelectedTEGetFunctor<T>* func, const T& ignore_value);
S32 getNumNodes();
@@ -856,7 +861,7 @@ void dialog_refresh_all();
//-----------------------------------------------------------------------------
// getSelectedTEValue
//-----------------------------------------------------------------------------
-template <typename T> bool LLObjectSelection::getSelectedTEValue(LLSelectedTEGetFunctor<T>* func, T& res)
+template <typename T> bool LLObjectSelection::getSelectedTEValue(LLSelectedTEGetFunctor<T>* func, T& res, bool has_tolerance, T tolerance)
{
bool have_first = false;
bool have_selected = false;
@@ -892,7 +897,14 @@ template <typename T> bool LLObjectSelection::getSelectedTEValue(LLSelectedTEGet
{
if ( value != selected_value )
{
- identical = false;
+ if (!has_tolerance)
+ {
+ identical = false;
+ }
+ else if (!LLCheckIdenticalFunctor<T>::same(value, selected_value, tolerance))
+ {
+ identical = false;
+ }
}
if (te == selected_te)
{