summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatertoybox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloatertoybox.cpp')
-rw-r--r--indra/newview/llfloatertoybox.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/indra/newview/llfloatertoybox.cpp b/indra/newview/llfloatertoybox.cpp
index beb928ea36..c3fa322f85 100644
--- a/indra/newview/llfloatertoybox.cpp
+++ b/indra/newview/llfloatertoybox.cpp
@@ -67,9 +67,6 @@ BOOL LLFloaterToybox::postBuild()
if (command->availableInToybox())
{
mToolBar->addCommand(command->id());
-
- llassert(gToolBarView != NULL);
- mToolBar->enableCommand(command->id(), !gToolBarView->hasCommand(command->id()));
}
}
@@ -93,17 +90,29 @@ void LLFloaterToybox::onClose(bool app_quitting)
void LLFloaterToybox::draw()
{
+ llassert(gToolBarView != NULL);
+
+ LLCommandManager& cmdMgr = LLCommandManager::instance();
+
+ for (U32 i = 0; i < cmdMgr.commandCount(); i++)
+ {
+ LLCommand * command = cmdMgr.getCommand(i);
+
+ if (command->availableInToybox())
+ {
+ mToolBar->enableCommand(command->id(), !gToolBarView->hasCommand(command->id()));
+ }
+ }
+
LLFloater::draw();
}
void LLFloaterToybox::onFocusReceived()
{
-
}
void LLFloaterToybox::onBtnRestoreDefaults()
{
-
}