From c47d42d9459445d9e9869c49ebe66a0671a3a0a7 Mon Sep 17 00:00:00 2001 From: Kadah_Coba Date: Wed, 29 Jun 2011 23:40:20 -0700 Subject: STORM-1315 Ability to do simple math in numeric edit fields --- indra/newview/llpanelface.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/newview/llpanelface.cpp') diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 07c7f35989..de5522c8fb 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -30,6 +30,7 @@ #include "llpanelface.h" // library includes +#include "llcalc.h" #include "llerror.h" #include "llfocusmgr.h" #include "llrect.h" @@ -926,6 +927,16 @@ void LLPanelFace::getState() getChildView("button apply")->setEnabled(enabled); } } + + // Set variable values for numeric expressions + LLCalc* calcp = LLCalc::getInstance(); + calcp->setVar(LLCalc::TEX_U_SCALE, childGetValue("TexScaleU").asReal()); + calcp->setVar(LLCalc::TEX_V_SCALE, childGetValue("TexScaleV").asReal()); + calcp->setVar(LLCalc::TEX_U_OFFSET, childGetValue("TexOffsetU").asReal()); + calcp->setVar(LLCalc::TEX_V_OFFSET, childGetValue("TexOffsetV").asReal()); + calcp->setVar(LLCalc::TEX_ROTATION, childGetValue("TexRot").asReal()); + calcp->setVar(LLCalc::TEX_TRANSPARENCY, childGetValue("ColorTrans").asReal()); + calcp->setVar(LLCalc::TEX_GLOW, childGetValue("glow").asReal()); } else { -- cgit v1.2.3 From bb410e9576c582594e61b7f0dc0723eb5640f8ed Mon Sep 17 00:00:00 2001 From: Kadah_Coba Date: Sat, 2 Jul 2011 22:19:59 -0700 Subject: Fix for STORM-1315 Clear the texture variables on no selection --- indra/newview/llpanelface.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/newview/llpanelface.cpp') diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index de5522c8fb..a4f6921f98 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -972,6 +972,16 @@ void LLPanelFace::getState() //getChildView("has media")->setEnabled(FALSE); //getChildView("media info set")->setEnabled(FALSE); + + // Set variable values for numeric expressions + LLCalc* calcp = LLCalc::getInstance(); + calcp->clearVar(LLCalc::TEX_U_SCALE); + calcp->clearVar(LLCalc::TEX_V_SCALE); + calcp->clearVar(LLCalc::TEX_U_OFFSET); + calcp->clearVar(LLCalc::TEX_V_OFFSET); + calcp->clearVar(LLCalc::TEX_ROTATION); + calcp->clearVar(LLCalc::TEX_TRANSPARENCY); + calcp->clearVar(LLCalc::TEX_GLOW); } } -- cgit v1.2.3