Added a bit of debug output for viewer tool states.
This commit is contained in:
@@ -77,6 +77,8 @@ void LLToolComposite::setCurrentTool( LLTool* new_tool )
|
|||||||
{
|
{
|
||||||
if( mCur != new_tool )
|
if( mCur != new_tool )
|
||||||
{
|
{
|
||||||
|
if(new_tool)
|
||||||
|
lldebugs << "Current Tool: " << new_tool->getName() << llendl;
|
||||||
if( mSelected )
|
if( mSelected )
|
||||||
{
|
{
|
||||||
mCur->handleDeselect();
|
mCur->handleDeselect();
|
||||||
|
|||||||
@@ -80,11 +80,11 @@ LLToolMgr::LLToolMgr()
|
|||||||
gToolNull = new LLTool(LLStringUtil::null); // Does nothing
|
gToolNull = new LLTool(LLStringUtil::null); // Does nothing
|
||||||
setCurrentTool(gToolNull);
|
setCurrentTool(gToolNull);
|
||||||
|
|
||||||
gBasicToolset = new LLToolset();
|
gBasicToolset = new LLToolset("Basic");
|
||||||
gCameraToolset = new LLToolset();
|
gCameraToolset = new LLToolset("Camera");
|
||||||
// gLandToolset = new LLToolset();
|
// gLandToolset = new LLToolset("Land");
|
||||||
gMouselookToolset = new LLToolset();
|
gMouselookToolset = new LLToolset("MouseLook");
|
||||||
gFaceEditToolset = new LLToolset();
|
gFaceEditToolset = new LLToolset("FaceEdit");
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLToolMgr::initTools()
|
void LLToolMgr::initTools()
|
||||||
@@ -149,6 +149,7 @@ void LLToolMgr::setCurrentToolset(LLToolset* current)
|
|||||||
{
|
{
|
||||||
mSelectedTool->handleDeselect();
|
mSelectedTool->handleDeselect();
|
||||||
}
|
}
|
||||||
|
lldebugs << "Current tool set: " << current->getName() << llendl;
|
||||||
mCurrentToolset = current;
|
mCurrentToolset = current;
|
||||||
// select first tool of new toolset only if toolset changed
|
// select first tool of new toolset only if toolset changed
|
||||||
mCurrentToolset->selectFirstTool();
|
mCurrentToolset->selectFirstTool();
|
||||||
@@ -164,6 +165,8 @@ LLToolset* LLToolMgr::getCurrentToolset()
|
|||||||
|
|
||||||
void LLToolMgr::setCurrentTool( LLTool* tool )
|
void LLToolMgr::setCurrentTool( LLTool* tool )
|
||||||
{
|
{
|
||||||
|
if(tool && mBaseTool!=tool)
|
||||||
|
lldebugs << "Current Tool: " << tool->getName() << llendl;
|
||||||
if (mTransientTool)
|
if (mTransientTool)
|
||||||
{
|
{
|
||||||
mTransientTool = NULL;
|
mTransientTool = NULL;
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ protected:
|
|||||||
class LLToolset
|
class LLToolset
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LLToolset() : mSelectedTool(NULL) {}
|
LLToolset(const char *name) : mSelectedTool(NULL), mName(name) {}
|
||||||
|
|
||||||
LLTool* getSelectedTool() { return mSelectedTool; }
|
LLTool* getSelectedTool() { return mSelectedTool; }
|
||||||
|
|
||||||
@@ -109,7 +109,9 @@ public:
|
|||||||
|
|
||||||
BOOL isToolSelected( S32 index );
|
BOOL isToolSelected( S32 index );
|
||||||
|
|
||||||
|
const char* getName() const {return mName;}
|
||||||
protected:
|
protected:
|
||||||
|
const char* mName;
|
||||||
LLTool* mSelectedTool;
|
LLTool* mSelectedTool;
|
||||||
typedef std::vector<LLTool*> tool_list_t;
|
typedef std::vector<LLTool*> tool_list_t;
|
||||||
tool_list_t mToolList;
|
tool_list_t mToolList;
|
||||||
|
|||||||
Reference in New Issue
Block a user