diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-06-21 08:04:56 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-06-21 08:04:56 +0000 |
commit | 9ec432034dc3c45d7ce763eb02dae4cc7f6b8da8 (patch) | |
tree | 4a505c1e0919af52800b3ffb3eaf135e7d6f9ce6 /indra/newview/lltoolcomp.cpp | |
parent | 351ebe9fcb76f3b99c2957004bb8493a904869ee (diff) |
merge -r 122421-124917 viewer-2.0.0-2 -> viewer-2.0.0-3
ignore-dead-branch
Diffstat (limited to 'indra/newview/lltoolcomp.cpp')
-rw-r--r-- | indra/newview/lltoolcomp.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
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; } |