Added a bit of debug output for viewer tool states.

This commit is contained in:
Shyotl
2011-10-31 20:36:47 -05:00
parent 6964cec6f1
commit 0ef5931212
3 changed files with 13 additions and 6 deletions

View File

@@ -77,6 +77,8 @@ void LLToolComposite::setCurrentTool( LLTool* new_tool )
{
if( mCur != new_tool )
{
if(new_tool)
lldebugs << "Current Tool: " << new_tool->getName() << llendl;
if( mSelected )
{
mCur->handleDeselect();

View File

@@ -80,11 +80,11 @@ LLToolMgr::LLToolMgr()
gToolNull = new LLTool(LLStringUtil::null); // Does nothing
setCurrentTool(gToolNull);
gBasicToolset = new LLToolset();
gCameraToolset = new LLToolset();
// gLandToolset = new LLToolset();
gMouselookToolset = new LLToolset();
gFaceEditToolset = new LLToolset();
gBasicToolset = new LLToolset("Basic");
gCameraToolset = new LLToolset("Camera");
// gLandToolset = new LLToolset("Land");
gMouselookToolset = new LLToolset("MouseLook");
gFaceEditToolset = new LLToolset("FaceEdit");
}
void LLToolMgr::initTools()
@@ -149,6 +149,7 @@ void LLToolMgr::setCurrentToolset(LLToolset* current)
{
mSelectedTool->handleDeselect();
}
lldebugs << "Current tool set: " << current->getName() << llendl;
mCurrentToolset = current;
// select first tool of new toolset only if toolset changed
mCurrentToolset->selectFirstTool();
@@ -164,6 +165,8 @@ LLToolset* LLToolMgr::getCurrentToolset()
void LLToolMgr::setCurrentTool( LLTool* tool )
{
if(tool && mBaseTool!=tool)
lldebugs << "Current Tool: " << tool->getName() << llendl;
if (mTransientTool)
{
mTransientTool = NULL;

View File

@@ -93,7 +93,7 @@ protected:
class LLToolset
{
public:
LLToolset() : mSelectedTool(NULL) {}
LLToolset(const char *name) : mSelectedTool(NULL), mName(name) {}
LLTool* getSelectedTool() { return mSelectedTool; }
@@ -109,7 +109,9 @@ public:
BOOL isToolSelected( S32 index );
const char* getName() const {return mName;}
protected:
const char* mName;
LLTool* mSelectedTool;
typedef std::vector<LLTool*> tool_list_t;
tool_list_t mToolList;