From 9ec432034dc3c45d7ce763eb02dae4cc7f6b8da8 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Sun, 21 Jun 2009 08:04:56 +0000 Subject: merge -r 122421-124917 viewer-2.0.0-2 -> viewer-2.0.0-3 ignore-dead-branch --- indra/newview/lltoolcomp.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'indra/newview/lltoolcomp.cpp') diff --git a/indra/newview/lltoolcomp.cpp b/indra/newview/lltoolcomp.cpp index 0b6e01886a..cb964082b8 100644 --- a/indra/newview/lltoolcomp.cpp +++ b/indra/newview/lltoolcomp.cpp @@ -34,6 +34,7 @@ #include "lltoolcomp.h" +#include "llfloaterreg.h" #include "llgl.h" #include "indra_constants.h" @@ -64,6 +65,9 @@ const S32 HPAD = 4; extern LLControlGroup gSavedSettings; +// we use this in various places instead of NULL +static LLTool* sNullTool = new LLTool(std::string("null"), NULL); + //----------------------------------------------------------------------- // LLToolComposite @@ -87,7 +91,9 @@ void LLToolComposite::setCurrentTool( LLTool* new_tool ) LLToolComposite::LLToolComposite(const std::string& name) : LLTool(name), - mCur(NULL), mDefault(NULL), mSelected(FALSE), + mCur(sNullTool), + mDefault(sNullTool), + mSelected(FALSE), mMouseDown(FALSE), mManip(NULL), mSelectRect(NULL) { } @@ -290,7 +296,7 @@ BOOL LLToolCompTranslate::handleDoubleClick(S32 x, S32 y, MASK mask) { // You should already have an object selected from the mousedown. // If so, show its properties - gFloaterTools->showPanel(LLFloaterTools::PANEL_CONTENTS); + LLFloaterReg::showInstance("build", "Content"); return TRUE; } // Nothing selected means the first mouse click was probably @@ -407,8 +413,7 @@ BOOL LLToolCompScale::handleDoubleClick(S32 x, S32 y, MASK mask) { // You should already have an object selected from the mousedown. // If so, show its properties - gFloaterTools->showPanel(LLFloaterTools::PANEL_CONTENTS); - //gBuildView->setPropertiesPanelOpen(TRUE); + LLFloaterReg::showInstance("build", "Content"); return TRUE; } else @@ -605,8 +610,7 @@ BOOL LLToolCompRotate::handleDoubleClick(S32 x, S32 y, MASK mask) { // You should already have an object selected from the mousedown. // If so, show its properties - gFloaterTools->showPanel(LLFloaterTools::PANEL_CONTENTS); - //gBuildView->setPropertiesPanelOpen(TRUE); + LLFloaterReg::showInstance("build", "Content"); return TRUE; } else @@ -638,7 +642,7 @@ LLToolCompGun::LLToolCompGun() { mGun = new LLToolGun(this); mGrab = new LLToolGrab(this); - mNull = new LLTool(std::string("null"), this); + mNull = sNullTool; setCurrentTool(mGun); mDefault = mGun; @@ -653,7 +657,8 @@ LLToolCompGun::~LLToolCompGun() delete mGrab; mGrab = NULL; - delete mNull; + // don't delete a static object + // delete mNull; mNull = NULL; } -- cgit v1.2.3