summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatertoybox.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2011-09-27 10:20:18 -0700
committerLeyla Farazha <leyla@lindenlab.com>2011-09-27 10:20:18 -0700
commit7483d339ed8abe9785ddb33a72496bf8d4d63fa8 (patch)
tree3529c865d0f8e10bfa5172b8ea3e5c909f1e5e43 /indra/newview/llfloatertoybox.cpp
parent795ae760e8b81a4e1b0ae4666d94d80919305189 (diff)
parentb7cf5ff947161d0b7e42a9ed8fe10741bb7af100 (diff)
merge
Diffstat (limited to 'indra/newview/llfloatertoybox.cpp')
-rw-r--r--indra/newview/llfloatertoybox.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/newview/llfloatertoybox.cpp b/indra/newview/llfloatertoybox.cpp
index eaaaeb3357..beb928ea36 100644
--- a/indra/newview/llfloatertoybox.cpp
+++ b/indra/newview/llfloatertoybox.cpp
@@ -32,6 +32,7 @@
#include "llcommandmanager.h"
#include "llpanel.h"
#include "lltoolbar.h"
+#include "lltoolbarview.h"
LLFloaterToybox::LLFloaterToybox(const LLSD& key)
@@ -63,7 +64,13 @@ BOOL LLFloaterToybox::postBuild()
{
LLCommand * command = cmdMgr.getCommand(i);
- mToolBar->addCommand(command);
+ if (command->availableInToybox())
+ {
+ mToolBar->addCommand(command->id());
+
+ llassert(gToolBarView != NULL);
+ mToolBar->enableCommand(command->id(), !gToolBarView->hasCommand(command->id()));
+ }
}
return TRUE;