diff options
Diffstat (limited to 'indra/llui/lltoolbar.cpp')
-rw-r--r-- | indra/llui/lltoolbar.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index 2fb9f249d4..f8effb5bb6 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -187,12 +187,6 @@ void LLToolBar::initFromParams(const LLToolBar::Params& p) mCenteringStack->addChild(LLUICtrlFactory::create<LLLayoutPanel>(border_panel_p)); - BOOST_FOREACH (const LLCommandId::Params& command_id, p.commands) - { - mButtonCommands.push_back(command_id); - } - createButtons(); - mNeedsLayout = true; } @@ -202,8 +196,11 @@ bool LLToolBar::addCommand(const LLCommandId& commandId) bool add_command = (command != NULL); - mButtonCommands.push_back(commandId); - createButtons(); + if (add_command) + { + mButtonCommands.push_back(commandId); + createButtons(); + } return add_command; } |