diff options
Diffstat (limited to 'indra/newview/llmaniprotate.cpp')
| -rw-r--r-- | indra/newview/llmaniprotate.cpp | 31 | 
1 files changed, 12 insertions, 19 deletions
| diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp index c3e39429a2..d85a846f4d 100644 --- a/indra/newview/llmaniprotate.cpp +++ b/indra/newview/llmaniprotate.cpp @@ -105,7 +105,10 @@ void LLManipRotate::handleSelect()  {  	// *FIX: put this in mouseDown?  	LLSelectMgr::getInstance()->saveSelectedObjectTransform(SELECT_ACTION_TYPE_PICK); -	gFloaterTools->setStatusText("rotate"); +    if (gFloaterTools) +    { +        gFloaterTools->setStatusText("rotate"); +    }  	LLManip::handleSelect();  } @@ -154,10 +157,7 @@ void LLManipRotate::render()  		}  		else  		{ -			if (LLGLSLShader::sNoFixedFunction) -			{ -				gDebugProgram.bind(); -			} +			gDebugProgram.bind();  			LLGLEnable cull_face(GL_CULL_FACE);  			LLGLDepthTest gls_depth(GL_FALSE); @@ -210,10 +210,7 @@ void LLManipRotate::render()  			}  			gGL.popMatrix(); -			if (LLGLSLShader::sNoFixedFunction) -			{ -				gUIProgram.bind(); -			} +			gUIProgram.bind();  		}  		gGL.translatef( center.mV[VX], center.mV[VY], center.mV[VZ] ); @@ -231,10 +228,7 @@ void LLManipRotate::render()  		gGL.rotatef(angle_radians * RAD_TO_DEG, x, y, z); -		if (LLGLSLShader::sNoFixedFunction) -		{ -			gDebugProgram.bind(); -		} +		gDebugProgram.bind();  		if (mManipPart == LL_ROT_Z)  		{ @@ -352,11 +346,7 @@ void LLManipRotate::render()  		} -		if (LLGLSLShader::sNoFixedFunction) -		{ -			gUIProgram.bind(); -		} -		 +		gUIProgram.bind();  	}  	gGL.popMatrix();  	gGL.popMatrix(); @@ -1553,7 +1543,10 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y )  				LLVector3 object_axis;  				getObjectAxisClosestToMouse(object_axis); -				object_axis = object_axis * first_object_node->mSavedRotation; +                if (first_object_node) +                { +                    object_axis = object_axis * first_object_node->mSavedRotation; +                }  				// project onto constraint plane  				object_axis = object_axis - (object_axis * getConstraintAxis()) * getConstraintAxis(); | 
